Completed
Push — master ( 477c6b...8b3cf8 )
by Sébastien
04:39 queued 01:53
created

FFProbeConfig::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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 1
    public function __construct(string $binary)
18
    {
19 1
        $this->binary = $binary;
20 1
    }
21
22 1
    public function getBinary(): string
23
    {
24 1
        return $this->binary;
25
    }
26
27 1
    public function getProcess(): FFprobeProcess
28
    {
29 1
        if ($this->process === null) {
30 1
            $this->process = new FFprobeProcess($this);
31
        }
32
33 1
        return $this->process;
34
    }
35
}
36