@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | return ApiHelper::mapList( |
| 54 | - static function ($data) { |
|
| 54 | + static function($data) { |
|
| 55 | 55 | return Song::fromApi($data); |
| 56 | 56 | }, |
| 57 | 57 | $response['artisttracks']['track'] |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | return ApiHelper::mapList( |
| 75 | - static function ($data) { |
|
| 75 | + static function($data) { |
|
| 76 | 76 | return User::fromApi($data); |
| 77 | 77 | }, |
| 78 | 78 | $response['friends']['user'] |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | public function getInfo(string $username): ?User |
| 83 | 83 | { |
| 84 | - $response = $this->client->unsignedCall('user.getInfo', [ |
|
| 84 | + $response = $this->client->unsignedCall('user.getInfo', [ |
|
| 85 | 85 | 'user' => $username, |
| 86 | 86 | ]); |
| 87 | 87 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | return ApiHelper::mapList( |
| 108 | - static function ($data) { |
|
| 108 | + static function($data) { |
|
| 109 | 109 | return Song::fromApi($data); |
| 110 | 110 | }, |
| 111 | 111 | $response['lovedtracks']['track'] |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | return ApiHelper::mapList( |
| 132 | - static function ($data) { |
|
| 132 | + static function($data) { |
|
| 133 | 133 | return Song::fromApi($data); |
| 134 | 134 | }, |
| 135 | 135 | $response['recenttracks']['track'] |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | public function getPersonalTagsForArtist(string $username, string $tag, int $limit = 50, int $page = 1): array |
| 140 | 140 | { |
| 141 | - $response = $this->client->unsignedCall('user.getPersonalTags', [ |
|
| 141 | + $response = $this->client->unsignedCall('user.getPersonalTags', [ |
|
| 142 | 142 | 'taggingtype' => 'artist', |
| 143 | 143 | 'user' => $username, |
| 144 | 144 | 'tag' => $tag, |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | return ApiHelper::mapList( |
| 154 | - static function ($data) { |
|
| 154 | + static function($data) { |
|
| 155 | 155 | return Artist::fromApi($data); |
| 156 | 156 | }, |
| 157 | 157 | $response['taggings']['artists']['artist'] |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | return ApiHelper::mapList( |
| 176 | - static function ($data) { |
|
| 176 | + static function($data) { |
|
| 177 | 177 | return Album::fromApi($data); |
| 178 | 178 | }, |
| 179 | 179 | $response['taggings']['albums']['album'] |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | return ApiHelper::mapList( |
| 198 | - static function ($data) { |
|
| 198 | + static function($data) { |
|
| 199 | 199 | return SongInfo::fromApi($data); |
| 200 | 200 | }, |
| 201 | 201 | $response['taggings']['tracks']['track'] |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | return ApiHelper::mapList( |
| 219 | - static function ($data) { |
|
| 219 | + static function($data) { |
|
| 220 | 220 | return Album::fromApi($data); |
| 221 | 221 | }, |
| 222 | 222 | $response['topalbums']['album'] |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | return ApiHelper::mapList( |
| 240 | - static function ($data) { |
|
| 240 | + static function($data) { |
|
| 241 | 241 | return Artist::fromApi($data); |
| 242 | 242 | }, |
| 243 | 243 | $response['topartists']['artist'] |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | return ApiHelper::mapList( |
| 259 | - static function ($data) { |
|
| 259 | + static function($data) { |
|
| 260 | 260 | return Tag::fromApi($data); |
| 261 | 261 | }, |
| 262 | 262 | $response['toptags']['tag'] |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | return ApiHelper::mapList( |
| 280 | - static function ($data) { |
|
| 280 | + static function($data) { |
|
| 281 | 281 | return SongInfo::fromApi($data); |
| 282 | 282 | }, |
| 283 | 283 | $response['toptracks']['track'] |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | } |
| 299 | 299 | |
| 300 | 300 | return ApiHelper::mapList( |
| 301 | - static function ($data) { |
|
| 301 | + static function($data) { |
|
| 302 | 302 | return Album::fromApi($data); |
| 303 | 303 | }, |
| 304 | 304 | $response['weeklyalbumchart']['album'] |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | return ApiHelper::mapList( |
| 322 | - static function ($data) { |
|
| 322 | + static function($data) { |
|
| 323 | 323 | return Artist::fromApi($data); |
| 324 | 324 | }, |
| 325 | 325 | $response['weeklyartistchart']['artist'] |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | return ApiHelper::mapList( |
| 340 | - static function ($data) { |
|
| 340 | + static function($data) { |
|
| 341 | 341 | return Chart::fromApi($data); |
| 342 | 342 | }, |
| 343 | 343 | $response['weeklychartlist']['chart'] |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | return ApiHelper::mapList( |
| 361 | - static function ($data) { |
|
| 361 | + static function($data) { |
|
| 362 | 362 | return SongInfo::fromApi($data); |
| 363 | 363 | }, |
| 364 | 364 | $response['weeklytrackchart']['track'] |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | throw new InvalidArgumentException('A maximum of 10 tags is allowed'); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - array_filter($tags, static function ($tag) { |
|
| 53 | + array_filter($tags, static function($tag) { |
|
| 54 | 54 | if (null === $tag || !\is_string($tag)) { |
| 55 | 55 | throw new InvalidArgumentException(sprintf('Invalid tag given')); |
| 56 | 56 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | return ApiHelper::mapList( |
| 98 | - static function ($data) { |
|
| 98 | + static function($data) { |
|
| 99 | 99 | return Artist::fromApi($data); |
| 100 | 100 | }, |
| 101 | 101 | $response['similarartists']['artist'] |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | return ApiHelper::mapList( |
| 114 | - static function ($data) { |
|
| 114 | + static function($data) { |
|
| 115 | 115 | return Tag::fromApi($data); |
| 116 | 116 | }, |
| 117 | 117 | $response['tags']['tag'] |
@@ -120,14 +120,14 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | public function getTopAlbums(ArtistTopAlbumsBuilder $builder): array |
| 122 | 122 | { |
| 123 | - $response = $this->client->unsignedCall('artist.getTopAlbums', $builder->getQuery()); |
|
| 123 | + $response = $this->client->unsignedCall('artist.getTopAlbums', $builder->getQuery()); |
|
| 124 | 124 | |
| 125 | 125 | if (!isset($response['topalbums']['album'])) { |
| 126 | 126 | return []; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | return ApiHelper::mapList( |
| 130 | - static function ($data) { |
|
| 130 | + static function($data) { |
|
| 131 | 131 | return Album::fromApi($data); |
| 132 | 132 | }, |
| 133 | 133 | $response['topalbums']['album'] |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | return ApiHelper::mapList( |
| 146 | - static function ($data) { |
|
| 146 | + static function($data) { |
|
| 147 | 147 | return Tag::fromApi($data); |
| 148 | 148 | }, |
| 149 | 149 | $response['toptags']['tag'] |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | return ApiHelper::mapList( |
| 162 | - static function ($data) { |
|
| 162 | + static function($data) { |
|
| 163 | 163 | return Song::fromApi($data); |
| 164 | 164 | }, |
| 165 | 165 | $response['toptracks']['track'] |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | return ApiHelper::mapList( |
| 190 | - static function ($data) { |
|
| 190 | + static function($data) { |
|
| 191 | 191 | return Artist::fromApi($data); |
| 192 | 192 | }, |
| 193 | 193 | $response['results']['artistmatches']['artist'] |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | |
| 48 | 48 | public function getPageBody(string $url, array $params = [], string $method = 'GET'): ?string |
| 49 | 49 | { |
| 50 | - $request = $this->createRequest($method, $url, $params); |
|
| 50 | + $request = $this->createRequest($method, $url, $params); |
|
| 51 | 51 | |
| 52 | 52 | try { |
| 53 | 53 | $response = $this->client->sendRequest($request); |