FeatureSetFactory::getMethods()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 38
Code Lines 25

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 37
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 25
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 38
ccs 37
cts 37
cp 1
crap 1
rs 9.52
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 12
    public function getMethods(): array
23
    {
24 12
        return [
25 12
            'ping.view' => static fn (): Method\V1161MethodInterface => new Method\PingMethod(
26 12
                new ResponderFactory()
27 12
            ),
28 12
            'getLicense.view' => static fn (): Method\V1161MethodInterface => new Method\GetLicenseMethod(
29 12
                new ResponderFactory()
30 12
            ),
31 12
            'getAlbum.view' => static fn (): Method\V1161MethodInterface => new Method\GetAlbumMethod(
32 12
                new ResponderFactory()
33 12
            ),
34 12
            'getAlbumList2.view' => static fn (): Method\V1161MethodInterface => new Method\GetAlbumList2Method(
35 12
                new ResponderFactory()
36 12
            ),
37 12
            'getArtists.view' => static fn (): Method\V1161MethodInterface => new Method\GetArtistsMethod(
38 12
                new ResponderFactory()
39 12
            ),
40 12
            'getCoverArt.view' => static fn (): Method\V1161MethodInterface => new Method\GetCoverArtMethod(
41 12
                new ResponderFactory()
42 12
            ),
43 12
            'getArtist.view' => static fn (): Method\V1161MethodInterface => new Method\GetArtistMethod(
44 12
                new ResponderFactory()
45 12
            ),
46 12
            'getGenres.view' => static fn (): Method\V1161MethodInterface => new Method\GetGenresMethod(
47 12
                new ResponderFactory()
48 12
            ),
49 12
            'getMusicFolders.view' => static fn (): Method\V1161MethodInterface => new Method\GetMusicFoldersMethod(
50 12
                new ResponderFactory()
51 12
            ),
52 12
            'stream.view' => static fn (): Method\V1161MethodInterface => new Method\StreamMethod(
53 12
                new ResponderFactory()
54 12
            ),
55 12
            'getStarred2.view' => static fn (): Method\V1161MethodInterface => new Method\GetStarred2Method(
56 12
                new ResponderFactory()
57 12
            ),
58 12
            'getRandomSongs.view' => static fn (): Method\V1161MethodInterface => new Method\GetRandomSongsMethod(
59 12
                new ResponderFactory()
60 12
            ),
61 12
        ];
62
    }
63
}
64