| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | public function parseResponse(array $response, MusicBrainz $brainz) |
||
| 51 | { |
||
| 52 | |||
| 53 | if (!isset($response['release-groups'])) { |
||
| 54 | throw new Exception('No release groups found'); |
||
| 55 | } |
||
| 56 | |||
| 57 | $releaseGroups = array(); |
||
| 58 | foreach ($response['release-groups'] as $releaseGroup) { |
||
| 59 | $releaseGroups[] = new ReleaseGroup($releaseGroup, $brainz); |
||
| 60 | } |
||
| 61 | |||
| 62 | return $releaseGroups; |
||
| 63 | } |
||
| 64 | } |
||
| 65 |