| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function getArt(string $coverArtId): array |
||
| 31 | { |
||
| 32 | // @todo Currently artists only; Merge with Api\Art\ArtApplication |
||
| 33 | $str = explode('-', $coverArtId); |
||
| 34 | |||
| 35 | /** @var ArtistInterface $artist */ |
||
| 36 | $artist = $this->artistRepository->find((int) $str[1]); |
||
| 37 | |||
| 38 | try { |
||
| 39 | $artContent = $this->artContentRetriever->retrieve($artist); |
||
| 40 | } catch (ArtContentException) { |
||
| 41 | $artContent = []; |
||
| 42 | } |
||
| 43 | |||
| 44 | return [ |
||
| 45 | 'art' => $artContent['content'] ?? '', |
||
| 46 | 'contentType' => $artContent['mimeType'] ?? '', |
||
| 47 | ]; |
||
| 50 |