| Conditions | 4 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 1 | public function handle(AlbumInformationFetched $event): void |
|
| 18 | { |
||
| 19 | 1 | $info = $event->getInformation(); |
|
| 20 | 1 | $album = $event->getAlbum(); |
|
| 21 | |||
| 22 | 1 | $image = array_get($info, 'image'); |
|
| 23 | |||
| 24 | // If our current album has no cover, and Last.fm has one, steal it? |
||
| 25 | 1 | if (!$album->has_cover && is_string($image) && ini_get('allow_url_fopen')) { |
|
| 26 | 1 | $this->mediaMetadataService->downloadAlbumCover($album, $image); |
|
| 27 | } |
||
| 30 |