Skip to content

Commit

Permalink
Fix thumbnail PHP type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkarex committed Feb 9, 2022
1 parent 133e0d6 commit a79bfe7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Models/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,17 @@ 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 a79bfe7

Please sign in to comment.