aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
authorGravatar Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 2023-04-07 12:32:10 +0200
committerGravatar GitHub <noreply@github.com> 2023-04-07 12:32:10 +0200
commitd23d10bcde1a9b86c784d58b891f61e740e0124e (patch)
tree6f907e5d13a04832b3350286b1b847fbb3842ee7 /app/Models/Entry.php
parent6c01e4e7d6c177ac345c826059e585bffdd1d517 (diff)
Phpstan Level6 for View.php (#5269)
* Remarque's from Alkarex * indentation * indentation * Apply suggestions from code review Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * 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 <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php6
1 files changed, 4 insertions, 2 deletions
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<string> */
+ 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<string> */
+ public function tags(bool $asString = false) {
if ($asString) {
return $this->tags == null ? '' : '#' . implode(' #', $this->tags);
} else {