Passed
Push — main ( 7e3d9c...caf64b )
by Daniel
02:21
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 => new Method\PingMethod(
26 1
                new ResponderFactory()
27
            ),
28 10
            'getLicense.view' => fn (): Method\V1161MethodInterface => new Method\GetLicenseMethod(
29 1
                new ResponderFactory()
30
            ),
31 10
            'getAlbum.view' => fn (): Method\V1161MethodInterface => new Method\GetAlbumMethod(
32 1
                new ResponderFactory()
33
            ),
34 10
            'getAlbumList2.view' => fn (): Method\V1161MethodInterface => new Method\GetAlbumList2Method(
35 1
                new ResponderFactory()
36
            ),
37 10
            'getArtists.view' => fn (): Method\V1161MethodInterface => new Method\GetArtistsMethod(
38 1
                new ResponderFactory()
39
            ),
40 10
            'getCoverArt.view' => fn (): Method\V1161MethodInterface => new Method\GetCoverArtMethod(
41 1
                new ResponderFactory()
42
            ),
43 10
            'getArtist.view' => fn (): Method\V1161MethodInterface => new Method\GetArtistMethod(
44 1
                new ResponderFactory()
45
            ),
46 10
            'getGenres.view' => fn (): Method\V1161MethodInterface => new Method\GetGenresMethod(
47 1
                new ResponderFactory()
48
            ),
49 10
            'getMusicFolders.view' => fn (): Method\V1161MethodInterface => new Method\GetMusicFoldersMethod(
50 1
                new ResponderFactory()
51
            ),
52 10
            'stream.view' => fn (): Method\V1161MethodInterface => new Method\StreamMethod(
53 1
                new ResponderFactory()
54
            ),
55
        ];
56
    }
57
}
58