From bd9fa803f1f0c23face77fa1bc550d1198ce5ad6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 2 May 2023 14:38:32 +0200 Subject: PHPStan Level 7 complete DAOs (#5354) * PHPStan Level 7 complete DAOs * Finalise PHPStan Level 7 for CategoryDAO * PHPStan Level 7 for Context and Search * Apply suggestions from code review Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> --- app/Models/Entry.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index c29f84172..8f2d66882 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -350,10 +350,7 @@ HTML; return $this->is_favorite; } - /** - * @return FreshRSS_Feed|null|false - */ - public function feed() { + public function feed(): ?FreshRSS_Feed { if ($this->feed === null) { $feedDAO = FreshRSS_Factory::createFeedDao(); $this->feed = $feedDAO->searchById($this->feedId); @@ -778,7 +775,10 @@ HTML; return false; } - /** @return array{'id':string,'guid':string,'title':string,'author':string,'content':string,'link':string,'date':int,'hash':string,'is_read':?bool,'is_favorite':?bool,'id_feed':int,'tags':string,'attributes':array} */ + /** + * @return array{'id':string,'guid':string,'title':string,'author':string,'content':string,'link':string,'date':int, + * 'hash':string,'is_read':?bool,'is_favorite':?bool,'id_feed':int,'tags':string,'attributes':array} + */ public function toArray(): array { return array( 'id' => $this->id(), -- cgit v1.2.3