VideoConverterFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 9
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @see       https://github.com/soluble-io/soluble-mediatools for the canonical repository
7
 *
8
 * @copyright Copyright (c) 2018-2020 Sébastien Vanvelthem. (https://github.com/belgattitude)
9
 * @license   https://github.com/soluble-io/soluble-mediatools/blob/master/LICENSE.md MIT
10
 */
11
12
namespace Soluble\MediaTools\Video;
13
14
use Psr\Container\ContainerInterface;
15
use Soluble\MediaTools\Video\Config\FFMpegConfigInterface;
16
use Soluble\MediaTools\Video\Logger\LoggerInterface;
17
18
final class VideoConverterFactory
19
{
20 20
    public function __invoke(ContainerInterface $container): VideoConverterInterface
21
    {
22 20
        $logger = $container->has(LoggerInterface::class) ? $container->get(LoggerInterface::class) : null;
23
24 20
        return new VideoConverter(
25 20
            $container->get(FFMpegConfigInterface::class),
26
            $logger
27
        );
28
    }
29
}
30