@@ -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'] |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | $resultList = []; |
| 33 | 33 | |
| 34 | - $node->filter('.page-content section')->each(function (Crawler $node) use (&$resultList) { |
|
| 34 | + $node->filter('.page-content section')->each(function(Crawler $node) use (&$resultList) { |
|
| 35 | 35 | $headingNode = $node->filter('.group-heading'); |
| 36 | 36 | |
| 37 | 37 | $datetime = new DateTime(trim($headingNode->text())); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | private function crawlEventListGroup(Crawler $node, DateTime $datetime): array |
| 68 | 68 | { |
| 69 | 69 | return $node->filter('.events-list-item')->each( |
| 70 | - function (Crawler $node) use ($datetime): Event { |
|
| 70 | + function(Crawler $node) use ($datetime): Event { |
|
| 71 | 71 | return $this->parseEvent($node, $datetime); |
| 72 | 72 | } |
| 73 | 73 | ); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $url .= '?location_0=Germany'; |
| 87 | 87 | $url .= '&location_1='.$location->getLongitude(); |
| 88 | 88 | $url .= '&location_2='.$location->getLatitude(); |
| 89 | - $url .= '&radius='.($radius*1000); |
|
| 89 | + $url .= '&radius='.($radius * 1000); |
|
| 90 | 90 | $url .= '&page='.$page; |
| 91 | 91 | |
| 92 | 92 | return $this->crawl($url); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $years = $node->filter('.content-top .secondary-nav-item-link') |
| 31 | - ->each(static function (Crawler $node) { |
|
| 31 | + ->each(static function(Crawler $node) { |
|
| 32 | 32 | return (int) trim($node->text()); |
| 33 | 33 | }) |
| 34 | 34 | ; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | return []; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - return $node->filter('.events-list-item')->each(function (Crawler $node): Event { |
|
| 53 | + return $node->filter('.events-list-item')->each(function(Crawler $node): Event { |
|
| 54 | 54 | return $this->parseEvent($node); |
| 55 | 55 | }); |
| 56 | 56 | } |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | */ |
| 105 | 105 | final protected function parseVenue(Crawler $node): ?Venue |
| 106 | 106 | { |
| 107 | - $title = $this->parseString($node->filter('.events-list-item-venue--title')); |
|
| 107 | + $title = $this->parseString($node->filter('.events-list-item-venue--title')); |
|
| 108 | 108 | |
| 109 | 109 | if (null === $title) { |
| 110 | 110 | return null; |