From dfac9f5813df7d4c7c812c381364c8898333f559 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 11 Sep 2024 17:14:53 +0200 Subject: PHPStan booleansInConditions (#6793) * PHPStan booleansInConditions * Uniformisation --- app/views/index/normal.phtml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'app/views/index/normal.phtml') 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="feed->priority() ?>">renderHelper('index/normal/entry_header'); + if ($this->feed === null || $this->entry === null) { + throw new Exception('Unexpected side effect!'); // Should never occur. Only for PHPStan + } ?>
@@ -86,6 +89,9 @@ $today = @strtotime('today'); 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 + } } ?>

entry->title() ?>

show_author_date === 'h' || FreshRSS_Context::userConf()->show_author_date === 'b') { ?> @@ -196,4 +202,7 @@ $today = @strtotime('today'); - 0 && FreshRSS_Context::userConf()->show_nav_buttons) $this->partial('nav_entries'); ?> + 0 && FreshRSS_Context::userConf()->show_nav_buttons) { + $this->partial('nav_entries'); + } -- cgit v1.2.3