Failed Conditions
Push — master ( df4f19...50f2bb )
by Sébastien
02:46 queued 13s
created

FFProbeConfig   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
eloc 8
dl 0
loc 25
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getProcess() 0 7 2
A getBinary() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Soluble\MediaTools\Config;
6
7
use Soluble\MediaTools\Process\FFprobeProcess;
8
9
class FFProbeConfig
10
{
11
    /** @var string */
12
    protected $binary;
13
14
    /** @var FFprobeProcess */
15
    protected $process;
16
17
    public function __construct(string $binary)
18
    {
19
        $this->binary = $binary;
20
    }
21
22
    public function getBinary(): string
23
    {
24
        return $this->binary;
25
    }
26
27
    public function getProcess(): FFprobeProcess
28
    {
29
        if ($this->process === null) {
30
            $this->process = new FFprobeProcess($this);
31
        }
32
33
        return $this->process;
34
    }
35
}
36