| Total Complexity | 5 | 
| Total Lines | 44 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 11 | final class AlbumList2Responder implements FormattedResponderInterface | ||
| 12 | { | ||
| 13 | /** | ||
| 14 |      * @param Traversable<array{ | ||
| 15 | * id: string, | ||
| 16 | * name: string, | ||
| 17 | * coverArt: string, | ||
| 18 | * songCount: int, | ||
| 19 | * created: string, | ||
| 20 | * duration: int, | ||
| 21 | * artist: string, | ||
| 22 | * artistId: string, | ||
| 23 | * }> $albumList | ||
| 24 | */ | ||
| 25 | 4 | public function __construct( | |
| 26 | private readonly Traversable $albumList, | ||
| 27 |     ) { | ||
| 28 | } | ||
| 29 | |||
| 30 | 1 | public function writeXml(XMLArray $XMLArray): void | |
| 41 | ); | ||
| 42 | } | ||
| 43 | } | ||
| 44 | ); | ||
| 45 | } | ||
| 46 | |||
| 47 | 1 | public function writeJson(array &$root): void | |
| 48 |     { | ||
| 49 | 1 | $root['albumList2'] = ['album' => iterator_to_array($this->albumList)]; | |
| 50 | } | ||
| 51 | |||
| 52 | 1 | public function isBinaryResponder(): bool | |
| 55 | } | ||
| 56 | } | ||
| 57 |