@@ -46,7 +46,7 @@ |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | return ApiHelper::mapList( |
| 49 | - static function ($data) { |
|
| 49 | + static function($data) { |
|
| 50 | 50 | return ArtistInfo::fromApi($data); |
| 51 | 51 | }, |
| 52 | 52 | $response['artists']['artist'] |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | throw new InvalidArgumentException('A maximum of 10 tags is allowed'); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - array_filter($tags, static function ($tag) { |
|
| 59 | + array_filter($tags, static function($tag) { |
|
| 60 | 60 | if (null === $tag || !\is_string($tag)) { |
| 61 | 61 | throw new InvalidArgumentException(sprintf('Invalid tag given')); |
| 62 | 62 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | return ApiHelper::mapList( |
| 113 | - static function ($data) { |
|
| 113 | + static function($data) { |
|
| 114 | 114 | return Artist::fromApi($data); |
| 115 | 115 | }, |
| 116 | 116 | $response['similarartists']['artist'] |
@@ -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 Tag::fromApi($data); |
| 134 | 134 | }, |
| 135 | 135 | $response['tags']['tag'] |
@@ -141,14 +141,14 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | public function getTopAlbums(ArtistTopAlbumsBuilder $builder): array |
| 143 | 143 | { |
| 144 | - $response = $this->client->unsignedCall('artist.getTopAlbums', $builder->getQuery()); |
|
| 144 | + $response = $this->client->unsignedCall('artist.getTopAlbums', $builder->getQuery()); |
|
| 145 | 145 | |
| 146 | 146 | if (!isset($response['topalbums']['album'])) { |
| 147 | 147 | return []; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | return ApiHelper::mapList( |
| 151 | - static function ($data) { |
|
| 151 | + static function($data) { |
|
| 152 | 152 | return Album::fromApi($data); |
| 153 | 153 | }, |
| 154 | 154 | $response['topalbums']['album'] |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | return ApiHelper::mapList( |
| 170 | - static function ($data) { |
|
| 170 | + static function($data) { |
|
| 171 | 171 | return Tag::fromApi($data); |
| 172 | 172 | }, |
| 173 | 173 | $response['toptags']['tag'] |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | return ApiHelper::mapList( |
| 189 | - static function ($data) { |
|
| 189 | + static function($data) { |
|
| 190 | 190 | return Song::fromApi($data); |
| 191 | 191 | }, |
| 192 | 192 | $response['toptracks']['track'] |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | return ApiHelper::mapList( |
| 223 | - static function ($data) { |
|
| 223 | + static function($data) { |
|
| 224 | 224 | return Artist::fromApi($data); |
| 225 | 225 | }, |
| 226 | 226 | $response['results']['artistmatches']['artist'] |
@@ -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 Artist::fromApi($data); |
| 52 | 52 | }, |
| 53 | 53 | $response['topartists']['artist'] |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | return ApiHelper::mapList( |
| 74 | - static function ($data) { |
|
| 74 | + static function($data) { |
|
| 75 | 75 | return Song::fromApi($data); |
| 76 | 76 | }, |
| 77 | 77 | $response['tracks']['track'] |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | throw new InvalidArgumentException('A maximum of 10 tags is allowed'); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - array_filter($tags, static function ($tag) { |
|
| 57 | + array_filter($tags, static function($tag) { |
|
| 58 | 58 | if (null === $tag || !\is_string($tag)) { |
| 59 | 59 | throw new InvalidArgumentException(sprintf('Invalid tag given')); |
| 60 | 60 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | return ApiHelper::mapList( |
| 113 | - static function ($data) { |
|
| 113 | + static function($data) { |
|
| 114 | 114 | return SongInfo::fromApi($data); |
| 115 | 115 | }, |
| 116 | 116 | $response['similartracks']['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 Tag::fromApi($data); |
| 134 | 134 | }, |
| 135 | 135 | $response['tags']['tag'] |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | return ApiHelper::mapList( |
| 151 | - static function ($data) { |
|
| 151 | + static function($data) { |
|
| 152 | 152 | return Tag::fromApi($data); |
| 153 | 153 | }, |
| 154 | 154 | $response['toptags']['tag'] |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | return ApiHelper::mapList( |
| 214 | - static function ($data) { |
|
| 214 | + static function($data) { |
|
| 215 | 215 | return SongInfo::fromApi($data); |
| 216 | 216 | }, |
| 217 | 217 | $response['results']['trackmatches']['track'] |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | - * @param Crawler|null $node |
|
| 41 | + * @param Crawler $node |
|
| 42 | 42 | * |
| 43 | 43 | * @return array |
| 44 | 44 | */ |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $resultList = []; |
| 48 | 48 | |
| 49 | - $node->filter('.page-content section')->each(function (Crawler $node) use (&$resultList) { |
|
| 49 | + $node->filter('.page-content section')->each(function(Crawler $node) use (&$resultList) { |
|
| 50 | 50 | $headingNode = $node->filter('.group-heading'); |
| 51 | 51 | |
| 52 | 52 | $datetime = new DateTime(trim($headingNode->text())); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | protected function crawlEventListGroup(Crawler $node, DateTime $datetime): array |
| 67 | 67 | { |
| 68 | 68 | return $node->filter('.events-list-item')->each( |
| 69 | - function (Crawler $node) use ($datetime): Event { |
|
| 69 | + function(Crawler $node) use ($datetime): Event { |
|
| 70 | 70 | $eventNode = $node->filter('.events-list-item-event--title a'); |
| 71 | 71 | |
| 72 | 72 | $url = $this->parseUrl($eventNode); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | $years = $node->filter('.content-top .secondary-nav-item-link') |
| 30 | - ->each(static function (Crawler $node) { |
|
| 30 | + ->each(static function(Crawler $node) { |
|
| 31 | 31 | return (int) trim($node->text()); |
| 32 | 32 | }) |
| 33 | 33 | ; |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $url .= '?location_0=Germany'; |
| 60 | 60 | $url .= '&location_1='.$location->getLongitude(); |
| 61 | 61 | $url .= '&location_2='.$location->getLatitude(); |
| 62 | - $url .= '&radius='.($radius*1000); |
|
| 62 | + $url .= '&radius='.($radius * 1000); |
|
| 63 | 63 | $url .= '&page='.$page; |
| 64 | 64 | |
| 65 | 65 | return $this->crawl($url); |