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/helpers/index/article.phtml | 9 ++++++--- app/views/helpers/index/normal/entry_bottom.phtml | 3 +++ app/views/helpers/index/normal/entry_header.phtml | 3 +++ app/views/helpers/index/tags.phtml | 3 +++ 4 files changed, 15 insertions(+), 3 deletions(-) (limited to 'app/views/helpers/index') diff --git a/app/views/helpers/index/article.phtml b/app/views/helpers/index/article.phtml index bdc108f1e..0a9c75bcd 100644 --- a/app/views/helpers/index/article.phtml +++ b/app/views/helpers/index/article.phtml @@ -4,6 +4,9 @@ /** @var FreshRSS_View $this */ $entry = $this->entry; $feed = $this->feed; + if ($feed === null || $entry === null) { + return; + } ?>
@@ -29,7 +32,7 @@ - +
show_feed_name === 't') { ?> @@ -42,7 +45,7 @@ topline_link && FreshRSS_Context::userConf()->show_article_icons == 't') { ?>
@@ -93,7 +96,7 @@ topline_link && FreshRSS_Context::userConf()->show_article_icons == 'a') { ?>
diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index 1de8395bc..51c103a74 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -1,6 +1,9 @@ entry === null) { + return; + } $bottomline_read = FreshRSS_Context::userConf()->bottomline_read; $bottomline_favorite = FreshRSS_Context::userConf()->bottomline_favorite; $bottomline_sharing = FreshRSS_Context::userConf()->bottomline_sharing && (count(FreshRSS_Context::userConf()->sharing) > 0); diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index ecaf0f0d6..a2f8d00fc 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -11,6 +11,9 @@ $topline_date = FreshRSS_Context::userConf()->topline_date; $topline_link = FreshRSS_Context::userConf()->topline_link; $lazyload = FreshRSS_Context::userConf()->lazyload; + if ($this->feed === null || $this->entry === null) { + return; + } ?>