Passed
Push — main ( cff59a...745121 )
by Daniel
02:18
created

FeatureSetFactory::createAlbumList2Method()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Usox\HyperSonic\FeatureSet\V1161;
6
7
use Usox\HyperSonic\FeatureSet\V1161\Responder\ResponderFactory;
8
9
/**
10
 * Provides the  methods for all subsonic 1.16.1 features
11
 */
12
final class FeatureSetFactory implements FeatureSetFactoryInterface
13
{
14 1
    public function getVersion(): string
15
    {
16 1
        return '1.16.1';
17
    }
18
19
    /**
20
     * @return array<string, callable(): Method\V1161MethodInterface>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<string, callable()...d\V1161MethodInterface> at position 4 could not be parsed: Expected '>' at position 4, but found 'callable'.
Loading history...
21
     */
22 10
    public function getMethods(): array
23
    {
24
        return [
25 10
            'ping.view' => fn (): Method\V1161MethodInterface => $this->createPingMethod(),
26 10
            'getLicense.view' => fn (): Method\V1161MethodInterface => $this->createGetLicenseMethod(),
27 10
            'getAlbum.view' => fn (): Method\V1161MethodInterface => $this->createGetAlbumMethod(),
28 10
            'getAlbumList2.view' => fn (): Method\V1161MethodInterface => $this->createAlbumList2Method(),
29 10
            'getArtists.view' => fn (): Method\V1161MethodInterface => $this->createGetArtistsMethod(),
30 10
            'getCoverArt.view' => fn (): Method\V1161MethodInterface => $this->createGetCoverArtMethod(),
31 10
            'getArtist.view' => fn (): Method\V1161MethodInterface => $this->createGetArtistMethod(),
32 10
            'getGenres.view' => fn (): Method\V1161MethodInterface => $this->createGetGenresMethod(),
33 10
            'getMusicFolders.view' => fn (): Method\V1161MethodInterface => $this->createGetMusicFoldersMethod(),
34 10
            'stream.view' => fn (): Method\V1161MethodInterface => $this->createStreamMethod(),
35
        ];
36
    }
37
38 1
    public function createPingMethod(): Method\V1161MethodInterface
39
    {
40 1
        return new Method\PingMethod(
41 1
            new ResponderFactory(),
42
        );
43
    }
44
45 1
    public function createGetArtistsMethod(): Method\V1161MethodInterface
46
    {
47 1
        return new Method\GetArtistsMethod(
48 1
            new ResponderFactory(),
49
        );
50
    }
51
52 1
    public function createGetLicenseMethod(): Method\V1161MethodInterface
53
    {
54 1
        return new Method\GetLicenseMethod(
55 1
            new ResponderFactory(),
56
        );
57
    }
58
59 1
    public function createGetCoverArtMethod(): Method\V1161MethodInterface
60
    {
61 1
        return new Method\GetCoverArtMethod(
62 1
            new ResponderFactory()
63
        );
64
    }
65
66 1
    public function createGetArtistMethod(): Method\V1161MethodInterface
67
    {
68 1
        return new Method\GetArtistMethod(
69 1
            new ResponderFactory()
70
        );
71
    }
72
73 1
    public function createGetGenresMethod(): Method\V1161MethodInterface
74
    {
75 1
        return new Method\GetGenresMethod(
76 1
            new ResponderFactory()
77
        );
78
    }
79
80 1
    public function createGetMusicFoldersMethod(): Method\V1161MethodInterface
81
    {
82 1
        return new Method\GetMusicFoldersMethod(
83 1
            new ResponderFactory()
84
        );
85
    }
86
87 1
    public function createGetAlbumMethod(): Method\V1161MethodInterface
88
    {
89 1
        return new Method\GetAlbumMethod(
90 1
            new ResponderFactory()
91
        );
92
    }
93
94 1
    public function createStreamMethod(): Method\V1161MethodInterface
95
    {
96 1
        return new Method\StreamMethod(
97 1
            new ResponderFactory()
98
        );
99
    }
100
101 1
    public function createAlbumList2Method(): Method\V1161MethodInterface
102
    {
103 1
        return new Method\GetAlbumList2Method(
104 1
            new ResponderFactory()
105
        );
106
    }
107
}
108