Skip to content

Commit

Permalink
Fix thumbnail PHP type hint (#4216)
Browse files Browse the repository at this point in the history
* Fix thumbnail PHP type hint
 #4215

* Blank
  • Loading branch information
Alkarex committed Feb 9, 2022
1 parent 133e0d6 commit 4b9d66f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/Models/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,16 @@ public function enclosures(bool $searchBodyImages = false): array {
}
}

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 {
Expand Down

0 comments on commit 4b9d66f

Please sign in to comment.