@@ -24,6 +24,9 @@ discard block |
||
24 | 24 | return new static($api); |
25 | 25 | } |
26 | 26 | |
27 | + /** |
|
28 | + * @param integer $limit |
|
29 | + */ |
|
27 | 30 | private function fetchTopTracks($username, $limit) |
28 | 31 | { |
29 | 32 | $params = [ |
@@ -85,6 +88,9 @@ discard block |
||
85 | 88 | return $lovedTracks; |
86 | 89 | } |
87 | 90 | |
91 | + /** |
|
92 | + * @param integer $limit |
|
93 | + */ |
|
88 | 94 | private function fetchLovedTracks($username, $limit) |
89 | 95 | { |
90 | 96 | $params = [ |
@@ -3,8 +3,8 @@ |
||
3 | 3 | namespace HansOtt\Lastify\Services; |
4 | 4 | |
5 | 5 | use Dandelionmood\LastFm\LastFm as LastFmWrapper; |
6 | -use HansOtt\Lastify\TrackInfo; |
|
7 | 6 | use HansOtt\Lastify\TrackCollection; |
7 | +use HansOtt\Lastify\TrackInfo; |
|
8 | 8 | use HansOtt\Lastify\TrackInfo\Artist; |
9 | 9 | use InvalidArgumentException; |
10 | 10 |
@@ -94,6 +94,9 @@ discard block |
||
94 | 94 | throw new PlaylistDoesNotExist($name); |
95 | 95 | } |
96 | 96 | |
97 | + /** |
|
98 | + * @return string |
|
99 | + */ |
|
97 | 100 | private function getUserId() |
98 | 101 | { |
99 | 102 | if (isset($this->userId)) { |
@@ -120,6 +123,9 @@ discard block |
||
120 | 123 | return $createdPlaylist->id; |
121 | 124 | } |
122 | 125 | |
126 | + /** |
|
127 | + * @param string $name |
|
128 | + */ |
|
123 | 129 | private function assertValidPlaylistName($name) |
124 | 130 | { |
125 | 131 | if (!is_string($name)) { |
@@ -2,15 +2,15 @@ |
||
2 | 2 | |
3 | 3 | namespace HansOtt\Lastify\Services; |
4 | 4 | |
5 | +use HansOtt\Lastify\CanManagePlaylists; |
|
6 | +use HansOtt\Lastify\Exception\PlaylistDoesNotExist; |
|
5 | 7 | use HansOtt\Lastify\SyncProgress; |
6 | -use HansOtt\Lastify\TrackInfo; |
|
7 | 8 | use HansOtt\Lastify\SyncResult; |
8 | -use InvalidArgumentException; |
|
9 | -use SpotifyWebAPI\SpotifyWebAPI; |
|
10 | 9 | use HansOtt\Lastify\TrackCollection; |
10 | +use HansOtt\Lastify\TrackInfo; |
|
11 | 11 | use HansOtt\Lastify\TrackInfo\Artist; |
12 | -use HansOtt\Lastify\CanManagePlaylists; |
|
13 | -use HansOtt\Lastify\Exception\PlaylistDoesNotExist; |
|
12 | +use InvalidArgumentException; |
|
13 | +use SpotifyWebAPI\SpotifyWebAPI; |
|
14 | 14 | |
15 | 15 | final class Spotify implements CanManagePlaylists |
16 | 16 | { |