@@ 12-73 (lines=62) @@ | ||
9 | ||
10 | namespace Core23\LastFm\Builder; |
|
11 | ||
12 | final class AlbumTopTagsBuilder |
|
13 | { |
|
14 | /** |
|
15 | * @var array |
|
16 | */ |
|
17 | private $query; |
|
18 | ||
19 | private function __construct() |
|
20 | { |
|
21 | $this->query = []; |
|
22 | } |
|
23 | ||
24 | /** |
|
25 | * @return AlbumTopTagsBuilder |
|
26 | */ |
|
27 | public static function forAlbum(string $artist, string $album): self |
|
28 | { |
|
29 | $builder = new static(); |
|
30 | ||
31 | $builder->query['artist'] = $artist; |
|
32 | $builder->query['album'] = $album; |
|
33 | ||
34 | return $builder; |
|
35 | } |
|
36 | ||
37 | /** |
|
38 | * @return AlbumTopTagsBuilder |
|
39 | */ |
|
40 | public static function forMbid(string $mbid): self |
|
41 | { |
|
42 | $builder = new static(); |
|
43 | ||
44 | $builder->query['mbid'] = $mbid; |
|
45 | ||
46 | return $builder; |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * @return AlbumTopTagsBuilder |
|
51 | */ |
|
52 | public function autocorrect(bool $autocorrect): self |
|
53 | { |
|
54 | $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
55 | ||
56 | return $this; |
|
57 | } |
|
58 | ||
59 | public function getQuery(): array |
|
60 | { |
|
61 | return $this->query; |
|
62 | } |
|
63 | } |
|
64 |
@@ 12-83 (lines=72) @@ | ||
9 | ||
10 | namespace Core23\LastFm\Builder; |
|
11 | ||
12 | final class ArtistTagsBuilder |
|
13 | { |
|
14 | /** |
|
15 | * @var array |
|
16 | */ |
|
17 | private $query; |
|
18 | ||
19 | private function __construct() |
|
20 | { |
|
21 | $this->query = []; |
|
22 | } |
|
23 | ||
24 | /** |
|
25 | * @return ArtistTagsBuilder |
|
26 | */ |
|
27 | public static function forArtist(string $artist): self |
|
28 | { |
|
29 | $builder = new static(); |
|
30 | ||
31 | $builder->query['artist'] = $artist; |
|
32 | ||
33 | return $builder; |
|
34 | } |
|
35 | ||
36 | /** |
|
37 | * @return ArtistTagsBuilder |
|
38 | */ |
|
39 | public static function forMbid(string $mbid): self |
|
40 | { |
|
41 | $builder = new static(); |
|
42 | ||
43 | $builder->query['mbid'] = $mbid; |
|
44 | ||
45 | return $builder; |
|
46 | } |
|
47 | ||
48 | /** |
|
49 | * @return ArtistTagsBuilder |
|
50 | */ |
|
51 | public function forUsername(string $name): self |
|
52 | { |
|
53 | $this->query['user'] = $name; |
|
54 | ||
55 | return $this; |
|
56 | } |
|
57 | ||
58 | /** |
|
59 | * @return ArtistTagsBuilder |
|
60 | */ |
|
61 | public function autocorrect(bool $autocorrect): self |
|
62 | { |
|
63 | $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
64 | ||
65 | return $this; |
|
66 | } |
|
67 | ||
68 | public function getQuery(): array |
|
69 | { |
|
70 | return $this->query; |
|
71 | } |
|
72 | } |
|
73 |
@@ 12-71 (lines=60) @@ | ||
9 | ||
10 | namespace Core23\LastFm\Builder; |
|
11 | ||
12 | final class ArtistTopTagsBuilder |
|
13 | { |
|
14 | /** |
|
15 | * @var array |
|
16 | */ |
|
17 | private $query; |
|
18 | ||
19 | private function __construct() |
|
20 | { |
|
21 | $this->query = []; |
|
22 | } |
|
23 | ||
24 | /** |
|
25 | * @return ArtistTopTagsBuilder |
|
26 | */ |
|
27 | public static function forArtist(string $artist): self |
|
28 | { |
|
29 | $builder = new static(); |
|
30 | ||
31 | $builder->query['artist'] = $artist; |
|
32 | ||
33 | return $builder; |
|
34 | } |
|
35 | ||
36 | /** |
|
37 | * @return ArtistTopTagsBuilder |
|
38 | */ |
|
39 | public static function forMbid(string $mbid): self |
|
40 | { |
|
41 | $builder = new static(); |
|
42 | ||
43 | $builder->query['mbid'] = $mbid; |
|
44 | ||
45 | return $builder; |
|
46 | } |
|
47 | ||
48 | /** |
|
49 | * @return ArtistTopTagsBuilder |
|
50 | */ |
|
51 | public function autocorrect(bool $autocorrect): self |
|
52 | { |
|
53 | $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
54 | ||
55 | return $this; |
|
56 | } |
|
57 | ||
58 | public function getQuery(): array |
|
59 | { |
|
60 | return $this->query; |
|
61 | } |
|
62 | } |
|
63 |
@@ 12-83 (lines=72) @@ | ||
9 | ||
10 | namespace Core23\LastFm\Builder; |
|
11 | ||
12 | final class SimilarArtistBuilder |
|
13 | { |
|
14 | /** |
|
15 | * @var array |
|
16 | */ |
|
17 | private $query; |
|
18 | ||
19 | private function __construct() |
|
20 | { |
|
21 | $this->query = []; |
|
22 | } |
|
23 | ||
24 | /** |
|
25 | * @return SimilarArtistBuilder |
|
26 | */ |
|
27 | public static function forArtist(string $artist): self |
|
28 | { |
|
29 | $builder = new static(); |
|
30 | ||
31 | $builder->query['artist'] = $artist; |
|
32 | ||
33 | return $builder; |
|
34 | } |
|
35 | ||
36 | /** |
|
37 | * @return SimilarArtistBuilder |
|
38 | */ |
|
39 | public static function forMbid(string $mbid): self |
|
40 | { |
|
41 | $builder = new static(); |
|
42 | ||
43 | $builder->query['mbid'] = $mbid; |
|
44 | ||
45 | return $builder; |
|
46 | } |
|
47 | ||
48 | /** |
|
49 | * @return SimilarArtistBuilder |
|
50 | */ |
|
51 | public function autocorrect(bool $autocorrect): self |
|
52 | { |
|
53 | $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
54 | ||
55 | return $this; |
|
56 | } |
|
57 | ||
58 | /** |
|
59 | * @return SimilarArtistBuilder |
|
60 | */ |
|
61 | public function limit(int $limit): self |
|
62 | { |
|
63 | $this->query['limit'] = $limit; |
|
64 | ||
65 | return $this; |
|
66 | } |
|
67 | ||
68 | public function getQuery(): array |
|
69 | { |
|
70 | return $this->query; |
|
71 | } |
|
72 | } |
|
73 |
@@ 12-83 (lines=72) @@ | ||
9 | ||
10 | namespace Core23\LastFm\Builder; |
|
11 | ||
12 | final class TrackInfoBuilder |
|
13 | { |
|
14 | /** |
|
15 | * @var array |
|
16 | */ |
|
17 | private $query; |
|
18 | ||
19 | private function __construct() |
|
20 | { |
|
21 | $this->query = []; |
|
22 | } |
|
23 | ||
24 | /** |
|
25 | * @return TrackInfoBuilder |
|
26 | */ |
|
27 | public static function forArtist(string $name): self |
|
28 | { |
|
29 | $builder = new static(); |
|
30 | ||
31 | $builder->query['artist'] = $name; |
|
32 | ||
33 | return $builder; |
|
34 | } |
|
35 | ||
36 | /** |
|
37 | * @return TrackInfoBuilder |
|
38 | */ |
|
39 | public static function forMbid(string $mbid): self |
|
40 | { |
|
41 | $builder = new static(); |
|
42 | ||
43 | $builder->query['mbid'] = $mbid; |
|
44 | ||
45 | return $builder; |
|
46 | } |
|
47 | ||
48 | /** |
|
49 | * @return TrackInfoBuilder |
|
50 | */ |
|
51 | public function forUsername(string $name): self |
|
52 | { |
|
53 | $this->query['username'] = $name; |
|
54 | ||
55 | return $this; |
|
56 | } |
|
57 | ||
58 | /** |
|
59 | * @return TrackInfoBuilder |
|
60 | */ |
|
61 | public function autocorrect(bool $autocorrect): self |
|
62 | { |
|
63 | $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
64 | ||
65 | return $this; |
|
66 | } |
|
67 | ||
68 | public function getQuery(): array |
|
69 | { |
|
70 | return $this->query; |
|
71 | } |
|
72 | } |
|
73 |
@@ 12-73 (lines=62) @@ | ||
9 | ||
10 | namespace Core23\LastFm\Builder; |
|
11 | ||
12 | final class TrackTopTagsBuilder |
|
13 | { |
|
14 | /** |
|
15 | * @var array |
|
16 | */ |
|
17 | private $query; |
|
18 | ||
19 | private function __construct() |
|
20 | { |
|
21 | $this->query = []; |
|
22 | } |
|
23 | ||
24 | /** |
|
25 | * @return TrackTopTagsBuilder |
|
26 | */ |
|
27 | public static function forTrack(string $artist, string $track): self |
|
28 | { |
|
29 | $builder = new static(); |
|
30 | ||
31 | $builder->query['artist'] = $artist; |
|
32 | $builder->query['track'] = $track; |
|
33 | ||
34 | return $builder; |
|
35 | } |
|
36 | ||
37 | /** |
|
38 | * @return TrackTopTagsBuilder |
|
39 | */ |
|
40 | public static function forMbid(string $mbid): self |
|
41 | { |
|
42 | $builder = new static(); |
|
43 | ||
44 | $builder->query['mbid'] = $mbid; |
|
45 | ||
46 | return $builder; |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * @return TrackTopTagsBuilder |
|
51 | */ |
|
52 | public function autocorrect(bool $autocorrect): self |
|
53 | { |
|
54 | $this->query['autocorrect'] = $autocorrect ? 1 : 0; |
|
55 | ||
56 | return $this; |
|
57 | } |
|
58 | ||
59 | public function getQuery(): array |
|
60 | { |
|
61 | return $this->query; |
|
62 | } |
|
63 | } |
|
64 |