From d23d10bcde1a9b86c784d58b891f61e740e0124e Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Fri, 7 Apr 2023 12:32:10 +0200 Subject: Phpstan Level6 for View.php (#5269) * Remarque's from Alkarex * indentation * indentation * Apply suggestions from code review Co-authored-by: Alexandre Alapetite * Remarque's from Alkarex * A few improvements * Remarque's from Alkarex * Remarque's from Alkarex * Remarque's from Alkarex * Remarque's from Alkarex * Fixes and improvments * Fix getTagsForEntry --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- app/Models/Entry.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 4a0f12c94..36c581746 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -48,7 +48,8 @@ class FreshRSS_Entry extends Minz_Model { */ private $feed; - private $tags; + /** @var array */ + private $tags = []; private $attributes = []; public function __construct(int $feedId = 0, string $guid = '', string $title = '', string $authors = '', string $content = '', @@ -347,7 +348,8 @@ HTML; return $this->feedId; } - public function tags($asString = false) { + /** @return string|array */ + public function tags(bool $asString = false) { if ($asString) { return $this->tags == null ? '' : '#' . implode(' #', $this->tags); } else { -- cgit v1.2.3