Bläddra i källkod

Fix thumbnail PHP type hint (#4216)

* Fix thumbnail PHP type hint
 https://github.com/FreshRSS/FreshRSS/issues/4215

* Blank
Alexandre Alapetite 4 år sedan
förälder
incheckning
4b9d66faca
1 ändrade filer med 5 tillägg och 2 borttagningar
  1. 5 2
      app/Models/Entry.php

+ 5 - 2
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 {