Passed
Push — master ( ff4791...e25d55 )
by Sébastien
07:48
created

MediaToolsService::getConverter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @see       https://github.com/soluble-io/soluble-mediatools-cli for the canonical repository
7
 *
8
 * @copyright Copyright (c) 2018-2019 Sébastien Vanvelthem. (https://github.com/belgattitude)
9
 * @license   https://github.com/soluble-io/soluble-mediatools-cli/blob/master/LICENSE.md MIT
10
 */
11
12
namespace Soluble\MediaTools\Cli\Service;
13
14
use Soluble\MediaTools\Video\VideoAnalyzerInterface;
15
use Soluble\MediaTools\Video\VideoConverterInterface;
16
use Soluble\MediaTools\Video\VideoInfoReaderInterface;
17
use Soluble\MediaTools\Video\VideoThumbGeneratorInterface;
18
19
class MediaToolsService implements MediaToolsServiceInterface
20
{
21
    /** @var VideoInfoReaderInterface */
22
    private $reader;
23
24
    /** @var VideoConverterInterface */
25
    private $converter;
26
27
    /** @var VideoAnalyzerInterface */
28
    private $analyzer;
29
30
    /** @var VideoThumbGeneratorInterface */
31
    private $thumbGenerator;
32
33 2
    public function __construct(
34
        VideoInfoReaderInterface $reader,
35
        VideoConverterInterface $converter,
36
        VideoThumbGeneratorInterface $thumbGenerator,
37
        VideoAnalyzerInterface $analyzer
38
    ) {
39 2
        $this->converter      = $converter;
40 2
        $this->reader         = $reader;
41 2
        $this->analyzer       = $analyzer;
42 2
        $this->thumbGenerator = $thumbGenerator;
43 2
    }
44
45
    public function getReader(): VideoInfoReaderInterface
46
    {
47
        return $this->reader;
48
    }
49
50
    public function getAnalyzer(): VideoAnalyzerInterface
51
    {
52
        return $this->analyzer;
53
    }
54
55
    public function getConverter(): VideoConverterInterface
56
    {
57
        return $this->converter;
58
    }
59
60
    public function getThumbGenerator(): VideoThumbGeneratorInterface
61
    {
62
        return $this->thumbGenerator;
63
    }
64
}
65