Passed
Pull Request — master (#7)
by
unknown
05:07
created
src/Application/SpotifyApiAuth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
      */
54 54
     public function getAccessByRefreshToken(string $refreshAccessToken) : string
55 55
     {
56
-        if( $this->session->refreshAccessToken($refreshAccessToken) !== true ) {
56
+        if ($this->session->refreshAccessToken($refreshAccessToken) !== true) {
57 57
             throw new \RuntimeException(Message::ERROR_GET_REFRESH_TOKEN_BY_CODE);
58 58
         }
59 59
         return $this->session->getAccessToken();
Please login to merge, or discard this patch.
src/Application/SpotifyWebApiPhp/Session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      * @param array $options
27 27
      * @return string
28 28
      */
29
-    public function getAuthorizeUrl(array $options = []) : string
29
+    public function getAuthorizeUrl(array $options = [ ]) : string
30 30
     {
31 31
         return $this->baseSession->getAuthorizeUrl($options);
32 32
     }
Please login to merge, or discard this patch.
src/Application/SpotifyWebApiPhp/SessionInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
      * @param array $options
10 10
      * @return string
11 11
      */
12
-    public function getAuthorizeUrl(array $options = []): string;
12
+    public function getAuthorizeUrl(array $options = [ ]): string;
13 13
 
14 14
     /**
15 15
      * @param string $authorizationCode
Please login to merge, or discard this patch.
config/config_default.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 use \Xervice\DataProvider\DataProviderConfig;
4 4
 
5
-$config[DataProviderConfig::DATA_PROVIDER_GENERATED_PATH] =  dirname(__DIR__) . '/src/Domain/DataTransferObject';
5
+$config[ DataProviderConfig::DATA_PROVIDER_GENERATED_PATH ] = dirname(__DIR__).'/src/Domain/DataTransferObject';
6 6
 
7
-$config[DataProviderConfig::DATA_PROVIDER_PATHS] = [
8
-    __DIR__ . '/xervice/schema'
7
+$config[ DataProviderConfig::DATA_PROVIDER_PATHS ] = [
8
+    __DIR__.'/xervice/schema'
9 9
 ];
10 10
 
11
-$config[DataProviderConfig::DATA_PROVIDER_NAMESPACE] = 'SpotifyApiConnect\\Domain\\DataTransferObject';
12 11
\ No newline at end of file
12
+$config[ DataProviderConfig::DATA_PROVIDER_NAMESPACE ] = 'SpotifyApiConnect\\Domain\\DataTransferObject';
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
test/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__ . '/../vendor/autoload.php';
3
+require __DIR__.'/../vendor/autoload.php';
Please login to merge, or discard this patch.
src/Application/SpotifyWebApiInterface.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param array $options
16 16
      * @return bool
17 17
      */
18
-    public function addPlaylistTracks($playlistId, array $tracks, array $options = []): bool;
18
+    public function addPlaylistTracks($playlistId, array $tracks, array $options = [ ]): bool;
19 19
 
20 20
     /**
21 21
      * @param string $playlistId
@@ -29,26 +29,26 @@  discard block
 block discarded – undo
29 29
      * @param array $options
30 30
      * @return PlaylistDataProvider
31 31
      */
32
-    public function getPlaylist(string $playlistId, array $options = []): PlaylistDataProvider;
32
+    public function getPlaylist(string $playlistId, array $options = [ ]): PlaylistDataProvider;
33 33
 
34 34
     /**
35 35
      * @param $playlistId
36 36
      * @param array $options
37 37
      * @return PlaylistTracksDataProvider
38 38
      */
39
-    public function getPlaylistTracks(string $playlistId, array $options = []);
39
+    public function getPlaylistTracks(string $playlistId, array $options = [ ]);
40 40
 
41 41
     /**
42 42
      * @param string $playlistName
43 43
      * @param array $options
44 44
      * @return PlaylistDataProvider
45 45
      */
46
-    public function getUserPlaylistByName(string $playlistName, array $options = []): PlaylistDataProvider;
46
+    public function getUserPlaylistByName(string $playlistName, array $options = [ ]): PlaylistDataProvider;
47 47
 
48 48
     /**
49 49
      * @param TrackSearchRequestDataProvider $trackSearchRequest
50 50
      * @param array $options
51 51
      * @return TracksSearchDataProvider
52 52
      */
53
-    public function searchTrack(TrackSearchRequestDataProvider $trackSearchRequest, array $options = []): TracksSearchDataProvider;
53
+    public function searchTrack(TrackSearchRequestDataProvider $trackSearchRequest, array $options = [ ]): TracksSearchDataProvider;
54 54
 }
55 55
\ No newline at end of file
Please login to merge, or discard this patch.
test/Integration/Application/SpotifyWebApiPhp/SessionTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,22 +28,22 @@
 block discarded – undo
28 28
 
29 29
         $this->assertNotEmpty($redirectUrl, 'authorize url from spotify is empty');
30 30
         $parseRedirectUrl = parse_url($redirectUrl);
31
-        $this->assertSame('accounts.spotify.com', $parseRedirectUrl['host']);
32
-        $this->assertSame('/authorize', $parseRedirectUrl['path']);
31
+        $this->assertSame('accounts.spotify.com', $parseRedirectUrl[ 'host' ]);
32
+        $this->assertSame('/authorize', $parseRedirectUrl[ 'path' ]);
33 33
 
34
-        $this->assertNotEmpty($parseRedirectUrl['query']);
34
+        $this->assertNotEmpty($parseRedirectUrl[ 'query' ]);
35 35
 
36
-        $info = [];
37
-        parse_str($parseRedirectUrl['query'], $info);
36
+        $info = [ ];
37
+        parse_str($parseRedirectUrl[ 'query' ], $info);
38 38
 
39
-        $this->assertSame('code', $info['response_type']);
40
-        $this->assertSame($_ENV['REDIRECT_URI'], $info['redirect_uri']);
41
-        $this->assertTrue(isset($info['client_id']));
39
+        $this->assertSame('code', $info[ 'response_type' ]);
40
+        $this->assertSame($_ENV[ 'REDIRECT_URI' ], $info[ 'redirect_uri' ]);
41
+        $this->assertTrue(isset($info[ 'client_id' ]));
42 42
     }
43 43
 
44 44
     public function testRefreshAccessToken()
45 45
     {
46
-        $this->assertTrue($this->session->refreshAccessToken($_ENV['REFRESH_TOKEN']));
46
+        $this->assertTrue($this->session->refreshAccessToken($_ENV[ 'REFRESH_TOKEN' ]));
47 47
         $this->assertNotEmpty($this->session->getAccessToken());
48 48
     }
49 49
 
Please login to merge, or discard this patch.
test/Integration/Application/SpotifyWebApiPhp/SpotifyWebApiTest.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         parent::setUp();
44 44
         $spotifyApiConnectFactory = new SpotifyApiConnectFactory();
45 45
         $spotifyApiAuth = $spotifyApiConnectFactory->createSpotifyApiAuth();
46
-        $accessToken = $spotifyApiAuth->getAccessByRefreshToken($_ENV['REFRESH_TOKEN']);
46
+        $accessToken = $spotifyApiAuth->getAccessByRefreshToken($_ENV[ 'REFRESH_TOKEN' ]);
47 47
         $this->spotifyWebApi = $spotifyApiConnectFactory->createSpotifyWebApi($accessToken);
48 48
     }
49 49
 
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
     public function testGetUserPlaylists(): void
52 52
     {
53 53
         $spotifyPlaylist = $this->spotifyWebApi->getUserPlaylistByName(
54
-            static::spotifyInfo['playlistName']
54
+            static::spotifyInfo[ 'playlistName' ]
55 55
         );
56
-        $this->assertSame(static::spotifyInfo['playlistId'], $spotifyPlaylist->getId());
56
+        $this->assertSame(static::spotifyInfo[ 'playlistId' ], $spotifyPlaylist->getId());
57 57
     }
58 58
 
59 59
     public function testGetUserPlaylistsNotFoundPlayList(): void
@@ -65,29 +65,29 @@  discard block
 block discarded – undo
65 65
     public function testAddPlaylistTracks()
66 66
     {
67 67
         $addResult = $this->spotifyWebApi->addPlaylistTracks(
68
-            static::spotifyInfo['playlistId'],
68
+            static::spotifyInfo[ 'playlistId' ],
69 69
             [
70
-                static::spotifySongInit['trackId']
70
+                static::spotifySongInit[ 'trackId' ]
71 71
             ]
72 72
         );
73 73
         $this->assertTrue($addResult);
74 74
 
75 75
         $spotifyPlayList = $this->spotifyWebApi->getPlaylistTracks(
76
-            static::spotifyInfo['playlistId']
76
+            static::spotifyInfo[ 'playlistId' ]
77 77
         );
78 78
 
79 79
         $this->assertNotEmpty($spotifyPlayList->getItems());
80 80
         $this->assertNotEmpty($spotifyPlayList->getTotal());
81
-        $this->assertSame(static::spotifySongInit['trackId'], $spotifyPlayList->getItems()[0]->getTrack()->getId());
82
-        $this->assertSame(static::spotifySongInit['artist'], $spotifyPlayList->getItems()[0]->getTrack()->getArtists()[0]->getName());
83
-        $this->assertSame(static::spotifySongInit['track'], $spotifyPlayList->getItems()[0]->getTrack()->getName());
81
+        $this->assertSame(static::spotifySongInit[ 'trackId' ], $spotifyPlayList->getItems()[ 0 ]->getTrack()->getId());
82
+        $this->assertSame(static::spotifySongInit[ 'artist' ], $spotifyPlayList->getItems()[ 0 ]->getTrack()->getArtists()[ 0 ]->getName());
83
+        $this->assertSame(static::spotifySongInit[ 'track' ], $spotifyPlayList->getItems()[ 0 ]->getTrack()->getName());
84 84
     }
85 85
 
86 86
     public function testAddPlaylistTracksNotExistTrackId()
87 87
     {
88 88
         try {
89 89
             $this->spotifyWebApi->addPlaylistTracks(
90
-                static::spotifyInfo['playlistId'],
90
+                static::spotifyInfo[ 'playlistId' ],
91 91
                 [
92 92
                     'uniTest-Not_FOUND--ID'
93 93
                 ]
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
     public function testGetPlaylist(): void
107 107
     {
108 108
         $spotifyPlayList = $this->spotifyWebApi->getPlaylist(
109
-            static::spotifyInfo['playlistId']
109
+            static::spotifyInfo[ 'playlistId' ]
110 110
         );
111
-        $this->assertSame(static::spotifyInfo['playlistId'], $spotifyPlayList->getId());
112
-        $this->assertSame(static::spotifyInfo['playlistName'], $spotifyPlayList->getName());
111
+        $this->assertSame(static::spotifyInfo[ 'playlistId' ], $spotifyPlayList->getId());
112
+        $this->assertSame(static::spotifyInfo[ 'playlistName' ], $spotifyPlayList->getName());
113 113
         $this->assertTrue($spotifyPlayList->getPublic());
114
-        $this->assertSame(self::spotifySongInit['artist'], $spotifyPlayList->getTracks()->getItems()[0]->getTrack()->getArtists()[0]->getName());
114
+        $this->assertSame(self::spotifySongInit[ 'artist' ], $spotifyPlayList->getTracks()->getItems()[ 0 ]->getTrack()->getArtists()[ 0 ]->getName());
115 115
     }
116 116
 
117 117
     public function testGetNoExistUserPlaylist(): void
@@ -134,18 +134,18 @@  discard block
 block discarded – undo
134 134
     {
135 135
         $trackSearchRequestDataProvider = new TrackSearchRequestDataProvider();
136 136
         $trackSearchRequestDataProvider->setArtist(
137
-            static::spotifySong['artist']
137
+            static::spotifySong[ 'artist' ]
138 138
         );
139 139
         $trackSearchRequestDataProvider->setTrack(
140
-            static::spotifySong['track']
140
+            static::spotifySong[ 'track' ]
141 141
         );
142 142
         $searchResult = $this->spotifyWebApi->searchTrack($trackSearchRequestDataProvider);
143 143
 
144 144
         $this->assertGreaterThan(0, $searchResult->getItems());
145 145
         $this->assertSame(
146
-            strtolower(static::spotifySong['track']),
146
+            strtolower(static::spotifySong[ 'track' ]),
147 147
             strtolower(
148
-                $searchResult->getItems()[0]->getName()
148
+                $searchResult->getItems()[ 0 ]->getName()
149 149
             )
150 150
         );
151 151
     }
@@ -167,24 +167,24 @@  discard block
 block discarded – undo
167 167
     public function testDeleteUserPlaylistTracks()
168 168
     {
169 169
         $spotifyPlayList = $this->spotifyWebApi->getPlaylistTracks(
170
-            static::spotifyInfo['playlistId']
170
+            static::spotifyInfo[ 'playlistId' ]
171 171
         );
172 172
 
173 173
         $this->assertCount(1, $spotifyPlayList->getItems());
174 174
         $this->assertSame(1, $spotifyPlayList->getTotal());
175 175
 
176 176
         $deleteTrack = new DeleteTrackInfoDataProvider();
177
-        $deleteTrack->setId(static::spotifySong['trackId']);
177
+        $deleteTrack->setId(static::spotifySong[ 'trackId' ]);
178 178
 
179 179
         $result = $this->spotifyWebApi->deletePlaylistTracks(
180
-            static::spotifyInfo['playlistId'],
181
-            [$deleteTrack]
180
+            static::spotifyInfo[ 'playlistId' ],
181
+            [ $deleteTrack ]
182 182
         );
183 183
 
184 184
         $this->assertTrue($result);
185 185
 
186 186
         $spotifyPlayList = $this->spotifyWebApi->getPlaylistTracks(
187
-            static::spotifyInfo['playlistId']
187
+            static::spotifyInfo[ 'playlistId' ]
188 188
         );
189 189
 
190 190
         $this->assertCount(1, $spotifyPlayList->getItems());
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
             $deleteTrack = new DeleteTrackInfoDataProvider();
198 198
             $deleteTrack->setId('uniTest-Not_FOUND--ID');
199 199
             $this->spotifyWebApi->deletePlaylistTracks(
200
-                static::spotifyInfo['playlistId'],
201
-                [$deleteTrack]
200
+                static::spotifyInfo[ 'playlistId' ],
201
+                [ $deleteTrack ]
202 202
             );
203 203
         } catch (\SpotifyWebAPI\SpotifyWebAPIException $e) {
204 204
             $this->assertSame(
@@ -215,40 +215,40 @@  discard block
 block discarded – undo
215 215
     {
216 216
         $this->expectException(\RuntimeException::class);
217 217
         $this->spotifyWebApi->deletePlaylistTracks(
218
-            static::spotifyInfo['playlistId'],
219
-            ['id' => 'hahaha']
218
+            static::spotifyInfo[ 'playlistId' ],
219
+            [ 'id' => 'hahaha' ]
220 220
         );
221 221
     }
222 222
 
223 223
     public function testDeleteAllSongsInPlaylist()
224 224
     {
225
-        $songsIds = include  __DIR__ . '/songs_ids.php';
225
+        $songsIds = include  __DIR__.'/songs_ids.php';
226 226
         $addResult = $this->spotifyWebApi->addPlaylistTracks(
227
-            static::spotifyInfo['playlistId'],
227
+            static::spotifyInfo[ 'playlistId' ],
228 228
             $songsIds
229 229
         );
230 230
         $this->assertTrue($addResult);
231 231
 
232 232
         $spotifyPlayList = $this->spotifyWebApi->getPlaylistTracks(
233
-            static::spotifyInfo['playlistId']
233
+            static::spotifyInfo[ 'playlistId' ]
234 234
         );
235 235
 
236 236
         $this->assertGreaterThan(210, $spotifyPlayList->getItems());
237 237
 
238
-        $deleteTracks = [];
238
+        $deleteTracks = [ ];
239 239
         foreach ($spotifyPlayList->getItems() as $item) {
240 240
             $deleteTrack = new DeleteTrackInfoDataProvider();
241 241
             $deleteTrack->setId($item->getTrack()->getId());
242
-            $deleteTracks[] = $deleteTrack;
242
+            $deleteTracks[ ] = $deleteTrack;
243 243
         }
244 244
 
245 245
         $this->spotifyWebApi->deletePlaylistTracks(
246
-            static::spotifyInfo['playlistId'],
246
+            static::spotifyInfo[ 'playlistId' ],
247 247
             $deleteTracks
248 248
         );
249 249
 
250 250
         $spotifyPlayList = $this->spotifyWebApi->getPlaylistTracks(
251
-            static::spotifyInfo['playlistId']
251
+            static::spotifyInfo[ 'playlistId' ]
252 252
         );
253 253
 
254 254
         $this->assertCount(0, $spotifyPlayList->getItems());
Please login to merge, or discard this patch.
src/Application/SpotifyWebApiPhp/SpotifyWebApi.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
      * @param array $options
53 53
      * @return bool
54 54
      */
55
-    public function addPlaylistTracks($playlistId, array $tracks, array $options = []): bool
55
+    public function addPlaylistTracks($playlistId, array $tracks, array $options = [ ]): bool
56 56
     {
57
-        $trackIds = [];
57
+        $trackIds = [ ];
58 58
         $returnAddPlaylistResult = false;
59 59
         foreach ($tracks as $trackId) {
60
-            $trackIds[] = $trackId;
60
+            $trackIds[ ] = $trackId;
61 61
             if (count($trackIds) % 100 === 0) {
62 62
                 $returnAddPlaylistResult = $this->baseSpotifyWebAPI->addPlaylistTracks($playlistId, $trackIds, $options);
63
-                $trackIds = [];
63
+                $trackIds = [ ];
64 64
             }
65 65
         }
66 66
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function deletePlaylistTracks(string $playlistId, array $tracksInfo): bool
80 80
     {
81
-        $tracksToDelete = [];
81
+        $tracksToDelete = [ ];
82 82
         $delete = false;
83 83
         $this->baseSpotifyWebAPI->setReturnType(Request::RETURN_OBJECT);
84 84
 
@@ -88,15 +88,15 @@  discard block
 block discarded – undo
88 88
                     sprintf(Message::ERROR_DELETE_PLAYLIST_TRACKS, DeleteTrackInfoDataProvider::class)
89 89
                 );
90 90
             }
91
-            $tracksToDelete[] = $deleteTrackInfoDataProvider->toArray();
91
+            $tracksToDelete[ ] = $deleteTrackInfoDataProvider->toArray();
92 92
             if (count($tracksToDelete) % 100 === 0) {
93
-                $delete = (bool)$this->baseSpotifyWebAPI->deletePlaylistTracks($playlistId, ['tracks' => $tracksToDelete]);
94
-                $tracksToDelete = [];
93
+                $delete = (bool) $this->baseSpotifyWebAPI->deletePlaylistTracks($playlistId, [ 'tracks' => $tracksToDelete ]);
94
+                $tracksToDelete = [ ];
95 95
             }
96 96
         }
97 97
 
98
-        if(!empty($tracksToDelete)) {
99
-            $delete = (bool)$this->baseSpotifyWebAPI->deletePlaylistTracks($playlistId, ['tracks' => $tracksToDelete]);
98
+        if (!empty($tracksToDelete)) {
99
+            $delete = (bool) $this->baseSpotifyWebAPI->deletePlaylistTracks($playlistId, [ 'tracks' => $tracksToDelete ]);
100 100
         }
101 101
 
102 102
         $this->baseSpotifyWebAPI->setReturnType(Request::RETURN_ASSOC);
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
      * @param array $options
110 110
      * @return PlaylistDataProvider
111 111
      */
112
-    public function getPlaylist(string $playlistId, array $options = []): PlaylistDataProvider
112
+    public function getPlaylist(string $playlistId, array $options = [ ]): PlaylistDataProvider
113 113
     {
114
-        $jsonObjectResult = (array)$this->baseSpotifyWebAPI->getPlaylist($playlistId, $options);
114
+        $jsonObjectResult = (array) $this->baseSpotifyWebAPI->getPlaylist($playlistId, $options);
115 115
 
116 116
         $playlistDataProvider = new PlaylistDataProvider();
117 117
         $playlistDataProvider->fromArray($jsonObjectResult);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      * @return PlaylistDataProvider
126 126
      * @throws PlaylistNotFound
127 127
      */
128
-    public function getUserPlaylistByName(string $playlistName, array $options = []): PlaylistDataProvider
128
+    public function getUserPlaylistByName(string $playlistName, array $options = [ ]): PlaylistDataProvider
129 129
     {
130 130
         $userPlaylistsDataProvider = $this->getUserPlaylists($options);
131 131
         $playlists = $userPlaylistsDataProvider->getItems();
@@ -143,23 +143,23 @@  discard block
 block discarded – undo
143 143
      * @param array $options
144 144
      * @return PlaylistTracksDataProvider
145 145
      */
146
-    public function getPlaylistTracks(string $playlistId, array $options = []): PlaylistTracksDataProvider
146
+    public function getPlaylistTracks(string $playlistId, array $options = [ ]): PlaylistTracksDataProvider
147 147
     {
148 148
         $offset = 0;
149
-        $items = [];
149
+        $items = [ ];
150 150
 
151 151
         do {
152
-            $response = (object)$this->baseSpotifyWebAPI->getPlaylistTracks($playlistId, [
152
+            $response = (object) $this->baseSpotifyWebAPI->getPlaylistTracks($playlistId, [
153 153
                 'offset' => $offset,
154 154
             ]);
155 155
             $offset += 100;
156
-            $items[] = $response->items;
156
+            $items[ ] = $response->items;
157 157
             $hasNext = $response->next;
158 158
         } while ($hasNext);
159
-        $response->items = array_merge([], ...$items);
159
+        $response->items = array_merge([ ], ...$items);
160 160
 
161 161
         $playlistTracksDataProvider = new PlaylistTracksDataProvider();
162
-        $playlistTracksDataProvider->fromArray((array)$response);
162
+        $playlistTracksDataProvider->fromArray((array) $response);
163 163
 
164 164
         return $playlistTracksDataProvider;
165 165
     }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      * @param array $options
170 170
      * @return TracksSearchDataProvider
171 171
      */
172
-    public function searchTrack(TrackSearchRequestDataProvider $trackSearchRequest, array $options = []): TracksSearchDataProvider
172
+    public function searchTrack(TrackSearchRequestDataProvider $trackSearchRequest, array $options = [ ]): TracksSearchDataProvider
173 173
     {
174 174
         $jsonObjectResult = $this->search(
175 175
             sprintf(
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         );
184 184
 
185 185
         $tracksSearchDataProvider = new TracksSearchDataProvider();
186
-        $tracksSearchDataProvider->fromArray($jsonObjectResult[$trackSearchRequest->getResultType()]);
186
+        $tracksSearchDataProvider->fromArray($jsonObjectResult[ $trackSearchRequest->getResultType() ]);
187 187
 
188 188
         return $tracksSearchDataProvider;
189 189
     }
@@ -194,18 +194,18 @@  discard block
 block discarded – undo
194 194
      * @param array $options
195 195
      * @return array
196 196
      */
197
-    private function search(string $query, array $type, array $options = []): array
197
+    private function search(string $query, array $type, array $options = [ ]): array
198 198
     {
199
-        return (array)$this->baseSpotifyWebAPI->search($query, $type, $options);
199
+        return (array) $this->baseSpotifyWebAPI->search($query, $type, $options);
200 200
     }
201 201
 
202 202
     /**
203 203
      * @param array $options
204 204
      * @return UserPlaylistsDataProvider
205 205
      */
206
-    private function getUserPlaylists(array $options = []): UserPlaylistsDataProvider
206
+    private function getUserPlaylists(array $options = [ ]): UserPlaylistsDataProvider
207 207
     {
208
-        $userPlaylistInfo = (array)$this->baseSpotifyWebAPI->getUserPlaylists($this->spotifyUsername, $options);
208
+        $userPlaylistInfo = (array) $this->baseSpotifyWebAPI->getUserPlaylists($this->spotifyUsername, $options);
209 209
 
210 210
         $userPlaylistsDataProvider = new UserPlaylistsDataProvider();
211 211
         $userPlaylistsDataProvider->fromArray($userPlaylistInfo);
Please login to merge, or discard this patch.