diff options
| author | 2023-12-18 17:59:16 +0100 | |
|---|---|---|
| committer | 2023-12-18 17:59:16 +0100 | |
| commit | a80a5f48a16e7d232168a7aaa68e9a1804235ce1 (patch) | |
| tree | a515b88592629dea7e83b96e26e2452d3f98a98e /app/views/helpers/index/normal/entry_header.phtml | |
| parent | 6bb45a87268157aab961a6a4a728d9a9bbe043b0 (diff) | |
Pass PHPStan level 8 (#5946)
* Pass PHPStan level 8
And prepare for PHPStan level 9 https://phpstan.org/user-guide/rule-levels
* Revert wrong replace in comment
* Fix PHPStan level 8
* Update PHPStan and other dev dependencies
* Remove obsolete comment
* noVariableVariables and towards bleedingEdge
https://github.com/phpstan/phpstan-strict-rules
https://phpstan.org/blog/what-is-bleeding-edge
* More bleedingEdge
* A bit more PHPStan level 9
* More PHPStan level 9
* Prepare for booleansInConditions
Ignore int and null
* Revert wrong line
* More fixes
* Fix keep_max_n_unread
* Stricter attribute functions
* Stricter callHooks and more PHPStan level 9
* More typing
* A tiny more
Diffstat (limited to 'app/views/helpers/index/normal/entry_header.phtml')
| -rw-r--r-- | app/views/helpers/index/normal/entry_header.phtml | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index 6a693b0a9..b324a5949 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -1,15 +1,18 @@ <?php declare(strict_types=1); /** @var FreshRSS_View $this */ - $topline_read = FreshRSS_Context::$user_conf->topline_read; - $topline_favorite = FreshRSS_Context::$user_conf->topline_favorite; - $topline_website = FreshRSS_Context::$user_conf->topline_website; - $topline_thumbnail = FreshRSS_Context::$user_conf->topline_thumbnail; - $topline_summary = FreshRSS_Context::$user_conf->topline_summary; - $topline_display_authors = FreshRSS_Context::$user_conf->topline_display_authors; - $topline_date = FreshRSS_Context::$user_conf->topline_date; - $topline_link = FreshRSS_Context::$user_conf->topline_link; - $lazyload = FreshRSS_Context::$user_conf->lazyload; + if ($this->feed === null) { + throw new FreshRSS_Context_Exception('Feed not initialised!'); + } + $topline_read = FreshRSS_Context::userConf()->topline_read; + $topline_favorite = FreshRSS_Context::userConf()->topline_favorite; + $topline_website = FreshRSS_Context::userConf()->topline_website; + $topline_thumbnail = FreshRSS_Context::userConf()->topline_thumbnail; + $topline_summary = FreshRSS_Context::userConf()->topline_summary; + $topline_display_authors = FreshRSS_Context::userConf()->topline_display_authors; + $topline_date = FreshRSS_Context::userConf()->topline_date; + $topline_link = FreshRSS_Context::userConf()->topline_link; + $lazyload = FreshRSS_Context::userConf()->lazyload; ?><ul class="horizontal-list flux_header website<?= $topline_website ?>"><?php if (FreshRSS_Auth::hasAccess()) { if ($topline_read) { @@ -37,7 +40,7 @@ if ($topline_website !== 'none'): ?><li class="item website <?= $topline_website ?>"> <a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>" class="item-element" title="<?= _t('gen.action.filter') ?>: <?= $this->feed->name() ?>"> - <?php if (FreshRSS_Context::$user_conf->show_favicons && 'name' !== $topline_website): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?><?php if ('icon' !== $topline_website): ?><span class="websiteName"><?= $this->feed->name() ?></span><?php endif; ?> + <?php if (FreshRSS_Context::userConf()->show_favicons && 'name' !== $topline_website): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?><?php if ('icon' !== $topline_website): ?><span class="websiteName"><?= $this->feed->name() ?></span><?php endif; ?> </a> </li><?php endif; ?> |
