| Total Complexity | 7 |
| Total Lines | 111 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class ResponderFactory implements ResponderFactoryInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @param array{ |
||
| 14 | * ignoredArticles: string, |
||
| 15 | * index: array<array{ |
||
| 16 | * name: string, |
||
| 17 | * artist: array<array{ |
||
| 18 | * id: string, |
||
| 19 | * name: string, |
||
| 20 | * coverArt: string, |
||
| 21 | * artistImageUrl: string, |
||
| 22 | * albumCount: int, |
||
| 23 | * starred?: string |
||
| 24 | * }> |
||
| 25 | * }> |
||
| 26 | * } $artistList |
||
| 27 | */ |
||
| 28 | 1 | public function createArtistsResponder( |
|
| 29 | array $artistList |
||
| 30 | ): ResponderInterface { |
||
| 31 | 1 | return new ArtistsResponder( |
|
| 32 | $artistList, |
||
| 33 | ); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param array{ |
||
| 38 | * valid: string, |
||
| 39 | * email: string, |
||
| 40 | * licenseExpires: string |
||
| 41 | * } $licenseData |
||
| 42 | */ |
||
| 43 | 1 | public function createLicenseResponder( |
|
| 44 | array $licenseData |
||
| 45 | ): ResponderInterface { |
||
| 46 | 1 | return new LicenseResponder( |
|
| 47 | $licenseData, |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | |||
| 51 | 1 | public function createPingResponder(): ResponderInterface |
|
| 52 | { |
||
| 53 | 1 | return new PingResponder(); |
|
| 54 | } |
||
| 55 | |||
| 56 | 1 | public function createCoverArtResponder( |
|
| 63 | ); |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param array{ |
||
| 68 | * id: string, |
||
| 69 | * name: string, |
||
| 70 | * coverArt: string, |
||
| 71 | * albumCount: int, |
||
| 72 | * artistImageUrl: string, |
||
| 73 | * } $artist |
||
| 74 | * @param array<array{ |
||
| 75 | * id: string, |
||
| 76 | * name: string, |
||
| 77 | * coverArt: string, |
||
| 78 | * songCount: int, |
||
| 79 | * created: string, |
||
| 80 | * duration: int, |
||
| 81 | * artist: string, |
||
| 82 | * artistId: string, |
||
| 83 | * year: string, |
||
| 84 | * genre: string, |
||
| 85 | * playCount: int |
||
| 86 | * }> $albums |
||
| 87 | */ |
||
| 88 | 1 | public function createArtistResponder( |
|
| 93 | } |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @param array<array{ |
||
| 97 | * value: string, |
||
| 98 | * albumCount: int, |
||
| 99 | * songCount: int |
||
| 100 | * }> $genres |
||
| 101 | */ |
||
| 102 | 1 | public function createGenresResponder( |
|
| 107 | ); |
||
| 108 | } |
||
| 109 | |||
| 110 | /** |
||
| 111 | * @param Traversable<array{ |
||
| 112 | * name: string, |
||
| 113 | * id: string |
||
| 114 | * }> $musicFolders |
||
| 115 | */ |
||
| 116 | 1 | public function createMusicFoldersResponder( |
|
| 121 | ); |
||
| 122 | } |
||
| 124 |