Passed
Push — master ( c03b7d...d95c98 )
by Sébastien
01:47
created

MediaToolsService::getConverter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
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 3
    public function __construct(
34
        VideoInfoReaderInterface $reader,
35
        VideoConverterInterface $converter,
36
        VideoThumbGeneratorInterface $thumbGenerator,
37
        VideoAnalyzerInterface $analyzer
38
    ) {
39 3
        $this->converter      = $converter;
40 3
        $this->reader         = $reader;
41 3
        $this->analyzer       = $analyzer;
42 3
        $this->thumbGenerator = $thumbGenerator;
43 3
    }
44
45 1
    public function getReader(): VideoInfoReaderInterface
46
    {
47 1
        return $this->reader;
48
    }
49
50
    public function getAnalyzer(): VideoAnalyzerInterface
51
    {
52
        return $this->analyzer;
53
    }
54
55 1
    public function getConverter(): VideoConverterInterface
56
    {
57 1
        return $this->converter;
58
    }
59
60
    public function getThumbGenerator(): VideoThumbGeneratorInterface
61
    {
62
        return $this->thumbGenerator;
63
    }
64
}
65