Skip to content

Commit

Permalink
[BUGFIX] Set getFirstMedia file reference nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
kanow committed Oct 28, 2024
1 parent c61dd38 commit 26e6553
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Classes/Domain/Model/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ public function getMedia(): ObjectStorage
/**
* Returns the first media
*
* @return FileReference $media
* @return ?FileReference $media
*/
public function getFirstMedia(): FileReference
public function getFirstMedia(): ?FileReference
{
$media = $this->getMedia()->toArray();
return $media[0];
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Model/Vehicle.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ public function getMedia(): ObjectStorage
/**
* Returns the first media
*
* @return FileReference $media
* @return ?FileReference $media
*/
public function getFirstMedia(): FileReference
public function getFirstMedia(): ?FileReference
{
$media = $this->getMedia()->toArray();
return $media[0];
Expand Down

0 comments on commit 26e6553

Please sign in to comment.