is_unknown) { return null; } $info = $this->lastfmService->getAlbumInformation($album->name, $album->artist->name); if ($info) { event(new AlbumInformationFetched($album, $info)); // The album cover may have been updated. $info->cover = $this->albumRepository->getOneById($album->id)->cover; } return $info; } public function getArtistInformation(Artist $artist): ?ArtistInformation { if ($artist->is_unknown) { return null; } $info = $this->lastfmService->getArtistInformation($artist->name); if ($info) { event(new ArtistInformationFetched($artist, $info)); // The artist image may have been updated. $info->image = $this->artistRepository->getOneById($artist->id)->image; } return $info; } }