@@ -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 | } |
@@ -17,34 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "name" : "Roll Over Beethoven", |
|
22 | - "info": "This is a song", |
|
23 | - "tape": 1, |
|
24 | - "cover" : { |
|
25 | - "mbid" : "592a3b6d-c42b-4567-99c9-ecf63bd66499", |
|
26 | - "tmid" : 734540, |
|
27 | - "name" : "Chuck Berry", |
|
28 | - "sortName" : "Berry, Chuck", |
|
29 | - "disambiguation" : "", |
|
30 | - "url" : "https://www.setlist.fm/setlists/chuck-berry-63d6a2b7.html" |
|
31 | - }, |
|
32 | - "with" : { |
|
33 | - "mbid" : "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d", |
|
34 | - "tmid" : 735610, |
|
35 | - "name" : "The Beatles", |
|
36 | - "sortName" : "Beatles, The", |
|
37 | - "disambiguation" : "", |
|
38 | - "url" : "https://www.setlist.fm/setlists/the-beatles-23d6a88b.html" |
|
39 | - } |
|
40 | - } |
|
41 | - EOD; |
|
42 | - |
|
43 | - $song = Song::fromApi(json_decode($data, true)); |
|
44 | - $this->assertSame('Roll Over Beethoven', $song->getName()); |
|
45 | - $this->assertSame('This is a song', $song->getInfo()); |
|
46 | - $this->assertNotNull($song->getCover()); |
|
47 | - $this->assertNotNull($song->getFeaturings()); |
|
48 | - $this->assertTrue($song->isTaped()); |
|
49 | - } |
|
50 | -} |
@@ -17,34 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "name" : "Roll Over Beethoven", |
|
22 | - "info": "This is a song", |
|
23 | - "tape": 1, |
|
24 | - "cover" : { |
|
25 | - "mbid" : "592a3b6d-c42b-4567-99c9-ecf63bd66499", |
|
26 | - "tmid" : 734540, |
|
27 | - "name" : "Chuck Berry", |
|
28 | - "sortName" : "Berry, Chuck", |
|
29 | - "disambiguation" : "", |
|
30 | - "url" : "https://www.setlist.fm/setlists/chuck-berry-63d6a2b7.html" |
|
31 | - }, |
|
32 | - "with" : { |
|
33 | - "mbid" : "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d", |
|
34 | - "tmid" : 735610, |
|
35 | - "name" : "The Beatles", |
|
36 | - "sortName" : "Beatles, The", |
|
37 | - "disambiguation" : "", |
|
38 | - "url" : "https://www.setlist.fm/setlists/the-beatles-23d6a88b.html" |
|
39 | - } |
|
40 | - } |
|
41 | - EOD; |
|
42 | - |
|
43 | - $song = Song::fromApi(json_decode($data, true)); |
|
44 | - $this->assertSame('Roll Over Beethoven', $song->getName()); |
|
45 | - $this->assertSame('This is a song', $song->getInfo()); |
|
46 | - $this->assertNotNull($song->getCover()); |
|
47 | - $this->assertNotNull($song->getFeaturings()); |
|
48 | - $this->assertTrue($song->isTaped()); |
|
49 | - } |
|
50 | -} |
@@ -17,12 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "name" : "North American Tour 1964" |
|
22 | - } |
|
23 | - EOD; |
|
24 | - |
|
25 | - $tour = Tour::fromApi(json_decode($data, true)); |
|
26 | - $this->assertSame('North American Tour 1964', $tour->getName()); |
|
27 | - } |
|
28 | -} |
@@ -17,12 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "name" : "North American Tour 1964" |
|
22 | - } |
|
23 | - EOD; |
|
24 | - |
|
25 | - $tour = Tour::fromApi(json_decode($data, true)); |
|
26 | - $this->assertSame('North American Tour 1964', $tour->getName()); |
|
27 | - } |
|
28 | -} |
@@ -17,20 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "userId": "Metal-42", |
|
22 | - "fullname": "Max", |
|
23 | - "about": "Some dummy text", |
|
24 | - "website": "http://example.com", |
|
25 | - "url": "https://www.setlist.fm/user/Metal-42" |
|
26 | - } |
|
27 | - EOD; |
|
28 | - |
|
29 | - $user = User::fromApi(json_decode($data, true)); |
|
30 | - $this->assertSame('Metal-42', $user->getId()); |
|
31 | - $this->assertSame('Some dummy text', $user->getAbout()); |
|
32 | - $this->assertSame('Max', $user->getFullname()); |
|
33 | - $this->assertSame('http://example.com', $user->getWebsite()); |
|
34 | - $this->assertSame('https://www.setlist.fm/user/Metal-42', $user->getUrl()); |
|
35 | - } |
|
36 | -} |
@@ -17,20 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "userId": "Metal-42", |
|
22 | - "fullname": "Max", |
|
23 | - "about": "Some dummy text", |
|
24 | - "website": "http://example.com", |
|
25 | - "url": "https://www.setlist.fm/user/Metal-42" |
|
26 | - } |
|
27 | - EOD; |
|
28 | - |
|
29 | - $user = User::fromApi(json_decode($data, true)); |
|
30 | - $this->assertSame('Metal-42', $user->getId()); |
|
31 | - $this->assertSame('Some dummy text', $user->getAbout()); |
|
32 | - $this->assertSame('Max', $user->getFullname()); |
|
33 | - $this->assertSame('http://example.com', $user->getWebsite()); |
|
34 | - $this->assertSame('https://www.setlist.fm/user/Metal-42', $user->getUrl()); |
|
35 | - } |
|
36 | -} |