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

FFprobeProcess   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
eloc 8
dl 0
loc 26
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getBinary() 0 3 1
A __construct() 0 3 1
A buildCommand() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Soluble\MediaTools\Process;
6
7
use Soluble\MediaTools\Config\FFProbeConfig;
8
9
class FFprobeProcess extends AbstractProcess
10
{
11
    /** @var FFProbeConfig */
12
    protected $config;
13
14
    public function __construct(FFProbeConfig $config)
15
    {
16
        $this->config = $config;
17
    }
18
19
    public function getBinary(): string
20
    {
21
        return $this->config->getBinary();
22
    }
23
24
    /**
25
     * @param string[] $arguments
26
     *
27
     * @return string
28
     */
29
    public function buildCommand(array $arguments): string
30
    {
31
        return sprintf(
32
            '%s %s',
33
            $this->config->getBinary(),
34
            implode(' ', $arguments)
35
        );
36
    }
37
}
38