aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-02-09 23:37:13 +0100
committerGravatar GitHub <noreply@github.com> 2022-02-09 23:37:13 +0100
commit4b9d66facafd6e795cd4953c39989bbf58486d40 (patch)
treea0284cca4ada348fc917857eb545118a6f131c53 /app/Models/Entry.php
parent133e0d61db4d316806686243e735961166113e1c (diff)
Fix thumbnail PHP type hint (#4216)
* Fix thumbnail PHP type hint https://github.com/FreshRSS/FreshRSS/issues/4215 * Blank
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index 3e0c3f37a..a190e505d 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -125,13 +125,16 @@ class FreshRSS_Entry extends Minz_Model {
}
}
- public function thumbnail(): string {
+ /**
+ * @return array<string,string>|null
+ */
+ public function thumbnail() {
foreach ($this->enclosures(true) as $enclosure) {
if (!empty($enclosure['url']) && empty($enclosure['type'])) {
return $enclosure;
}
}
- return '';
+ return null;
}
public function link(): string {