@@ -68,7 +68,7 @@ |
||
| 68 | 68 | */ |
| 69 | 69 | public function autocorrect(bool $autocorrect): self |
| 70 | 70 | { |
| 71 | - $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
| 71 | + $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
| 72 | 72 | |
| 73 | 73 | return $this; |
| 74 | 74 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | */ |
| 69 | 69 | public function autocorrect(bool $autocorrect): self |
| 70 | 70 | { |
| 71 | - $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
| 71 | + $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
| 72 | 72 | |
| 73 | 73 | return $this; |
| 74 | 74 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | */ |
| 69 | 69 | public function autocorrect(bool $autocorrect): self |
| 70 | 70 | { |
| 71 | - $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
| 71 | + $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
| 72 | 72 | |
| 73 | 73 | return $this; |
| 74 | 74 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function autocorrect(bool $autocorrect): self |
| 58 | 58 | { |
| 59 | - $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
| 59 | + $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
| 60 | 60 | |
| 61 | 61 | return $this; |
| 62 | 62 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function forUsername(string $name): self |
| 82 | 82 | { |
| 83 | - $this->query['username'] = $name; |
|
| 83 | + $this->query['username'] = $name; |
|
| 84 | 84 | |
| 85 | 85 | return $this; |
| 86 | 86 | } |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | */ |
| 113 | 113 | private function filterNull(array $object): array |
| 114 | 114 | { |
| 115 | - return array_filter($object, static function ($val) { |
|
| 115 | + return array_filter($object, static function($val) { |
|
| 116 | 116 | return null !== $val; |
| 117 | 117 | }); |
| 118 | 118 | } |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | */ |
| 54 | 54 | public function getPageBody(string $url, string $method = 'GET'): ?string |
| 55 | 55 | { |
| 56 | - $request = $this->messageFactory->createRequest($method, $url); |
|
| 56 | + $request = $this->messageFactory->createRequest($method, $url); |
|
| 57 | 57 | |
| 58 | 58 | try { |
| 59 | 59 | $response = $this->client->sendRequest($request); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | return ApiHelper::mapList( |
| 60 | - static function ($data) { |
|
| 60 | + static function($data) { |
|
| 61 | 61 | return Song::fromApi($data); |
| 62 | 62 | }, |
| 63 | 63 | $response['artisttracks']['track'] |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | return ApiHelper::mapList( |
| 84 | - static function ($data) { |
|
| 84 | + static function($data) { |
|
| 85 | 85 | return User::fromApi($data); |
| 86 | 86 | }, |
| 87 | 87 | $response['friends']['user'] |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | public function getInfo(string $username): ?User |
| 95 | 95 | { |
| 96 | - $response = $this->client->unsignedCall('user.getInfo', [ |
|
| 96 | + $response = $this->client->unsignedCall('user.getInfo', [ |
|
| 97 | 97 | 'user' => $username, |
| 98 | 98 | ]); |
| 99 | 99 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | return ApiHelper::mapList( |
| 123 | - static function ($data) { |
|
| 123 | + static function($data) { |
|
| 124 | 124 | return Song::fromApi($data); |
| 125 | 125 | }, |
| 126 | 126 | $response['lovedtracks']['track'] |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | return ApiHelper::mapList( |
| 150 | - static function ($data) { |
|
| 150 | + static function($data) { |
|
| 151 | 151 | return Song::fromApi($data); |
| 152 | 152 | }, |
| 153 | 153 | $response['recenttracks']['track'] |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | public function getPersonalTagsForArtist(string $username, string $tag, int $limit = 50, int $page = 1): array |
| 161 | 161 | { |
| 162 | - $response = $this->client->unsignedCall('user.getPersonalTags', [ |
|
| 162 | + $response = $this->client->unsignedCall('user.getPersonalTags', [ |
|
| 163 | 163 | 'taggingtype' => 'artist', |
| 164 | 164 | 'user' => $username, |
| 165 | 165 | 'tag' => $tag, |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | return ApiHelper::mapList( |
| 175 | - static function ($data) { |
|
| 175 | + static function($data) { |
|
| 176 | 176 | return Artist::fromApi($data); |
| 177 | 177 | }, |
| 178 | 178 | $response['taggings']['artists']['artist'] |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | return ApiHelper::mapList( |
| 200 | - static function ($data) { |
|
| 200 | + static function($data) { |
|
| 201 | 201 | return Album::fromApi($data); |
| 202 | 202 | }, |
| 203 | 203 | $response['taggings']['albums']['album'] |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | return ApiHelper::mapList( |
| 225 | - static function ($data) { |
|
| 225 | + static function($data) { |
|
| 226 | 226 | return SongInfo::fromApi($data); |
| 227 | 227 | }, |
| 228 | 228 | $response['taggings']['tracks']['track'] |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | return ApiHelper::mapList( |
| 249 | - static function ($data) { |
|
| 249 | + static function($data) { |
|
| 250 | 250 | return Album::fromApi($data); |
| 251 | 251 | }, |
| 252 | 252 | $response['topalbums']['album'] |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | return ApiHelper::mapList( |
| 273 | - static function ($data) { |
|
| 273 | + static function($data) { |
|
| 274 | 274 | return Artist::fromApi($data); |
| 275 | 275 | }, |
| 276 | 276 | $response['topartists']['artist'] |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | return ApiHelper::mapList( |
| 295 | - static function ($data) { |
|
| 295 | + static function($data) { |
|
| 296 | 296 | return Tag::fromApi($data); |
| 297 | 297 | }, |
| 298 | 298 | $response['toptags']['tag'] |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | return ApiHelper::mapList( |
| 319 | - static function ($data) { |
|
| 319 | + static function($data) { |
|
| 320 | 320 | return SongInfo::fromApi($data); |
| 321 | 321 | }, |
| 322 | 322 | $response['toptracks']['track'] |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | return ApiHelper::mapList( |
| 343 | - static function ($data) { |
|
| 343 | + static function($data) { |
|
| 344 | 344 | return Album::fromApi($data); |
| 345 | 345 | }, |
| 346 | 346 | $response['weeklyalbumchart']['album'] |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | return ApiHelper::mapList( |
| 367 | - static function ($data) { |
|
| 367 | + static function($data) { |
|
| 368 | 368 | return Artist::fromApi($data); |
| 369 | 369 | }, |
| 370 | 370 | $response['weeklyartistchart']['artist'] |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | return ApiHelper::mapList( |
| 388 | - static function ($data) { |
|
| 388 | + static function($data) { |
|
| 389 | 389 | return Chart::fromApi($data); |
| 390 | 390 | }, |
| 391 | 391 | $response['weeklychartlist']['chart'] |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | return ApiHelper::mapList( |
| 412 | - static function ($data) { |
|
| 412 | + static function($data) { |
|
| 413 | 413 | return SongInfo::fromApi($data); |
| 414 | 414 | }, |
| 415 | 415 | $response['weeklytrackchart']['track'] |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | throw new InvalidArgumentException('A maximum of 10 tags is allowed'); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - array_filter($tags, static function ($tag) { |
|
| 55 | + array_filter($tags, static function($tag) { |
|
| 56 | 56 | if (null === $tag || !\is_string($tag)) { |
| 57 | 57 | throw new InvalidArgumentException(sprintf('Invalid tag given')); |
| 58 | 58 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | return ApiHelper::mapList( |
| 90 | - static function ($data) { |
|
| 90 | + static function($data) { |
|
| 91 | 91 | return Tag::fromApi($data); |
| 92 | 92 | }, |
| 93 | 93 | $response['tags']['tag'] |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | return ApiHelper::mapList( |
| 109 | - static function ($data) { |
|
| 109 | + static function($data) { |
|
| 110 | 110 | return Tag::fromApi($data); |
| 111 | 111 | }, |
| 112 | 112 | $response['toptags']['tag'] |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | return ApiHelper::mapList( |
| 144 | - static function ($data) { |
|
| 144 | + static function($data) { |
|
| 145 | 145 | return Album::fromApi($data); |
| 146 | 146 | }, |
| 147 | 147 | $response['results']['albummatches']['album'] |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | return ApiHelper::mapList( |
| 50 | - static function ($data) { |
|
| 50 | + static function($data) { |
|
| 51 | 51 | return ArtistInfo::fromApi($data); |
| 52 | 52 | }, |
| 53 | 53 | $response['artists']['artist'] |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | return ApiHelper::mapList( |
| 72 | - static function ($data) { |
|
| 72 | + static function($data) { |
|
| 73 | 73 | return Tag::fromApi($data); |
| 74 | 74 | }, |
| 75 | 75 | $response['tags']['tag'] |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | return ApiHelper::mapList( |
| 94 | - static function ($data) { |
|
| 94 | + static function($data) { |
|
| 95 | 95 | return Song::fromApi($data); |
| 96 | 96 | }, |
| 97 | 97 | $response['tracks']['track'] |