Failed Conditions
Push — master ( c8847f...26090e )
by Sébastien
03:53
created

ConfigProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 28
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 1
A getDependencies() 0 12 1
A getDefaultConfiguration() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Soluble\MediaTools\Config;
6
7
use Soluble\MediaTools\VideoConvert;
8
use Soluble\MediaTools\VideoConvertFactory;
9
use Soluble\MediaTools\VideoProbe;
10
use Soluble\MediaTools\VideoProbeFactory;
11
use Soluble\MediaTools\VideoThumb;
12
use Soluble\MediaTools\VideoThumbFactory;
13
14
class ConfigProvider
15
{
16 1
    public function __invoke(): array
17
    {
18
        return [
19 1
            'dependencies' => $this->getDependencies(),
20
        ];
21
    }
22
23 5
    public function getDependencies(): array
24
    {
25
        return [
26 5
            'factories' => [
27
                // FFMpeg stuff
28
                FFMpegConfig::class   => FFMpegConfigFactory::class,
29
                FFProbeConfig::class  => FFProbeConfigFactory::class,
30
31
                // Services classes
32
                VideoConvert::class   => VideoConvertFactory::class,
33
                VideoProbe::class     => VideoProbeFactory::class,
34
                VideoThumb::class     => VideoThumbFactory::class,
35
            ],
36
        ];
37
    }
38
39 1
    public function getDefaultConfiguration(): array
40
    {
41 1
        return require dirname(__DIR__, 2) . '/config/soluble-mediatools.global.php';
42
    }
43
}
44