@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | return []; |
71 | 71 | } |
72 | 72 | |
73 | - return array_map(static function ($data) { |
|
73 | + return array_map(static function($data) { |
|
74 | 74 | return Setlist::fromApi($data); |
75 | 75 | }, $response['setlist']); |
76 | 76 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | return []; |
97 | 97 | } |
98 | 98 | |
99 | - return array_map(static function ($data) { |
|
99 | + return array_map(static function($data) { |
|
100 | 100 | return Setlist::fromApi($data); |
101 | 101 | }, $response['setlist']); |
102 | 102 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | return []; |
48 | 48 | } |
49 | 49 | |
50 | - return array_map(static function ($data) { |
|
50 | + return array_map(static function($data) { |
|
51 | 51 | return Country::fromApi($data); |
52 | 52 | }, $response['country']); |
53 | 53 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | return []; |
88 | 88 | } |
89 | 89 | |
90 | - return array_map(static function ($data) { |
|
90 | + return array_map(static function($data) { |
|
91 | 91 | return Setlist::fromApi($data); |
92 | 92 | }, $response['setlist']); |
93 | 93 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function getVenueSetlists(string $venueId, int $page = 1): array |
107 | 107 | { |
108 | - $response = $this->connection->call('venue/'.$venueId.'/setlists', [ |
|
108 | + $response = $this->connection->call('venue/'.$venueId.'/setlists', [ |
|
109 | 109 | 'p' => $page, |
110 | 110 | ]); |
111 | 111 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | return []; |
114 | 114 | } |
115 | 115 | |
116 | - return array_map(static function ($data) { |
|
116 | + return array_map(static function($data) { |
|
117 | 117 | return Setlist::fromApi($data); |
118 | 118 | }, $response['setlist']); |
119 | 119 | } |
@@ -127,13 +127,13 @@ discard block |
||
127 | 127 | */ |
128 | 128 | public function search(SetlistSearchBuilder $builder): array |
129 | 129 | { |
130 | - $response= $this->connection->call('search/setlists', $builder->getQuery()); |
|
130 | + $response = $this->connection->call('search/setlists', $builder->getQuery()); |
|
131 | 131 | |
132 | 132 | if (!\array_key_exists('setlist', $response)) { |
133 | 133 | return []; |
134 | 134 | } |
135 | 135 | |
136 | - return array_map(static function ($data) { |
|
136 | + return array_map(static function($data) { |
|
137 | 137 | return Setlist::fromApi($data); |
138 | 138 | }, $response['setlist']); |
139 | 139 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | return []; |
65 | 65 | } |
66 | 66 | |
67 | - return array_map(static function ($data) { |
|
67 | + return array_map(static function($data) { |
|
68 | 68 | return City::fromApi($data); |
69 | 69 | }, $response['cities']); |
70 | 70 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | return []; |
65 | 65 | } |
66 | 66 | |
67 | - return array_map(static function ($data) { |
|
67 | + return array_map(static function($data) { |
|
68 | 68 | return Venue::fromApi($data); |
69 | 69 | }, $response['venue']); |
70 | 70 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | return []; |
65 | 65 | } |
66 | 66 | |
67 | - return array_map(static function ($data) { |
|
67 | + return array_map(static function($data) { |
|
68 | 68 | return Artist::fromApi($data); |
69 | 69 | }, $response['artist']); |
70 | 70 | } |
@@ -18,25 +18,3 @@ |
||
18 | 18 | { |
19 | 19 | $apiData = json_decode( |
20 | 20 | <<<'EOD' |
21 | - { |
|
22 | - "mbid" : "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d", |
|
23 | - "tmid" : 735610, |
|
24 | - "name" : "The Beatles", |
|
25 | - "sortName" : "Beatles, The", |
|
26 | - "disambiguation" : "John, Paul, George and Ringo", |
|
27 | - "url" : "https://www.setlist.fm/setlists/the-beatles-23d6a88b.html" |
|
28 | - } |
|
29 | - EOD |
|
30 | - , |
|
31 | - true |
|
32 | - ); |
|
33 | - |
|
34 | - $artist = Artist::fromApi($apiData); |
|
35 | - $this->assertSame('The Beatles', $artist->getName()); |
|
36 | - $this->assertSame('Beatles, The', $artist->getSortName()); |
|
37 | - $this->assertSame('John, Paul, George and Ringo', $artist->getDisambiguation()); |
|
38 | - $this->assertSame('b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d', $artist->getMbid()); |
|
39 | - $this->assertSame(735610, $artist->getTmid()); |
|
40 | - $this->assertSame('https://www.setlist.fm/setlists/the-beatles-23d6a88b.html', $artist->getUrl()); |
|
41 | - } |
|
42 | -} |
@@ -18,25 +18,3 @@ |
||
18 | 18 | { |
19 | 19 | $apiData = json_decode( |
20 | 20 | <<<'EOD' |
21 | - { |
|
22 | - "mbid" : "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d", |
|
23 | - "tmid" : 735610, |
|
24 | - "name" : "The Beatles", |
|
25 | - "sortName" : "Beatles, The", |
|
26 | - "disambiguation" : "John, Paul, George and Ringo", |
|
27 | - "url" : "https://www.setlist.fm/setlists/the-beatles-23d6a88b.html" |
|
28 | - } |
|
29 | - EOD |
|
30 | - , |
|
31 | - true |
|
32 | - ); |
|
33 | - |
|
34 | - $artist = Artist::fromApi($apiData); |
|
35 | - $this->assertSame('The Beatles', $artist->getName()); |
|
36 | - $this->assertSame('Beatles, The', $artist->getSortName()); |
|
37 | - $this->assertSame('John, Paul, George and Ringo', $artist->getDisambiguation()); |
|
38 | - $this->assertSame('b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d', $artist->getMbid()); |
|
39 | - $this->assertSame(735610, $artist->getTmid()); |
|
40 | - $this->assertSame('https://www.setlist.fm/setlists/the-beatles-23d6a88b.html', $artist->getUrl()); |
|
41 | - } |
|
42 | -} |
@@ -18,31 +18,3 @@ |
||
18 | 18 | { |
19 | 19 | $apiData = json_decode( |
20 | 20 | <<<'EOD' |
21 | - { |
|
22 | - "id" : "5357527", |
|
23 | - "name" : "Hollywood", |
|
24 | - "stateCode" : "CA", |
|
25 | - "state" : "California", |
|
26 | - "coords" : { |
|
27 | - "long" : -118.3267434, |
|
28 | - "lat" : 34.0983425 |
|
29 | - }, |
|
30 | - "country" : { |
|
31 | - "code" : "US", |
|
32 | - "name" : "United States" |
|
33 | - } |
|
34 | - } |
|
35 | - EOD |
|
36 | - , |
|
37 | - true |
|
38 | - ); |
|
39 | - |
|
40 | - $city = City::fromApi($apiData); |
|
41 | - $this->assertSame(5357527, $city->getId()); |
|
42 | - $this->assertSame('Hollywood', $city->getName()); |
|
43 | - $this->assertSame('California', $city->getState()); |
|
44 | - $this->assertNotNull($city->getCounty()); |
|
45 | - $this->assertNotNull($city->getGeo()); |
|
46 | - $this->assertSame('CA', $city->getStateCode()); |
|
47 | - } |
|
48 | -} |
@@ -18,31 +18,3 @@ |
||
18 | 18 | { |
19 | 19 | $apiData = json_decode( |
20 | 20 | <<<'EOD' |
21 | - { |
|
22 | - "id" : "5357527", |
|
23 | - "name" : "Hollywood", |
|
24 | - "stateCode" : "CA", |
|
25 | - "state" : "California", |
|
26 | - "coords" : { |
|
27 | - "long" : -118.3267434, |
|
28 | - "lat" : 34.0983425 |
|
29 | - }, |
|
30 | - "country" : { |
|
31 | - "code" : "US", |
|
32 | - "name" : "United States" |
|
33 | - } |
|
34 | - } |
|
35 | - EOD |
|
36 | - , |
|
37 | - true |
|
38 | - ); |
|
39 | - |
|
40 | - $city = City::fromApi($apiData); |
|
41 | - $this->assertSame(5357527, $city->getId()); |
|
42 | - $this->assertSame('Hollywood', $city->getName()); |
|
43 | - $this->assertSame('California', $city->getState()); |
|
44 | - $this->assertNotNull($city->getCounty()); |
|
45 | - $this->assertNotNull($city->getGeo()); |
|
46 | - $this->assertSame('CA', $city->getStateCode()); |
|
47 | - } |
|
48 | -} |
@@ -18,17 +18,3 @@ |
||
18 | 18 | { |
19 | 19 | $apiData = json_decode( |
20 | 20 | <<<'EOD' |
21 | - { |
|
22 | - "code" : "US", |
|
23 | - "name" : "United States" |
|
24 | - } |
|
25 | - EOD |
|
26 | - , |
|
27 | - true |
|
28 | - ); |
|
29 | - |
|
30 | - $country = Country::fromApi($apiData); |
|
31 | - $this->assertSame('US', $country->getCode()); |
|
32 | - $this->assertSame('United States', $country->getName()); |
|
33 | - } |
|
34 | -} |
@@ -18,17 +18,3 @@ |
||
18 | 18 | { |
19 | 19 | $apiData = json_decode( |
20 | 20 | <<<'EOD' |
21 | - { |
|
22 | - "code" : "US", |
|
23 | - "name" : "United States" |
|
24 | - } |
|
25 | - EOD |
|
26 | - , |
|
27 | - true |
|
28 | - ); |
|
29 | - |
|
30 | - $country = Country::fromApi($apiData); |
|
31 | - $this->assertSame('US', $country->getCode()); |
|
32 | - $this->assertSame('United States', $country->getName()); |
|
33 | - } |
|
34 | -} |