aboutsummaryrefslogtreecommitdiff
path: root/app/views/index/normal.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-09-11 17:14:53 +0200
committerGravatar GitHub <noreply@github.com> 2024-09-11 17:14:53 +0200
commitdfac9f5813df7d4c7c812c381364c8898333f559 (patch)
tree978496d0a8d8b0d6b5dbe836c6829296133b337c /app/views/index/normal.phtml
parent31c8846791d4b5316fbc790202f79545c012f9c2 (diff)
PHPStan booleansInConditions (#6793)
* PHPStan booleansInConditions * Uniformisation
Diffstat (limited to 'app/views/index/normal.phtml')
-rw-r--r--app/views/index/normal.phtml11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml
index 40adc7f16..fe4af1a86 100644
--- a/app/views/index/normal.phtml
+++ b/app/views/index/normal.phtml
@@ -74,6 +74,9 @@ $today = @strtotime('today');
?>" data-priority="<?= $this->feed->priority()
?>"><?php
$this->renderHelper('index/normal/entry_header');
+ if ($this->feed === null || $this->entry === null) {
+ throw new Exception('Unexpected side effect!'); // Should never occur. Only for PHPStan
+ }
?><article class="flux_content" dir="auto">
<div class="content <?= FreshRSS_Context::userConf()->content_width ?>">
<header>
@@ -86,6 +89,9 @@ $today = @strtotime('today');
<?php } ?>
<?php if (FreshRSS_Context::userConf()->show_tags === 'h' || FreshRSS_Context::userConf()->show_tags === 'b') {
$this->renderHelper('index/tags');
+ if ($this->feed === null || $this->entry === null) {
+ throw new Exception('Unexpected side effect!'); // Should never occur. Only for PHPStan
+ }
} ?>
<h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?= $this->entry->link() ?>" title="<?= _t('conf.shortcut.see_on_website')?>"><?= $this->entry->title() ?></a></h1>
<?php if (FreshRSS_Context::userConf()->show_author_date === 'h' || FreshRSS_Context::userConf()->show_author_date === 'b') { ?>
@@ -196,4 +202,7 @@ $today = @strtotime('today');
<?= _i('close') ?>
</a>
-<?php if ($nbEntries > 0 && FreshRSS_Context::userConf()->show_nav_buttons) $this->partial('nav_entries'); ?>
+<?php
+ if ($nbEntries > 0 && FreshRSS_Context::userConf()->show_nav_buttons) {
+ $this->partial('nav_entries');
+ }