Completed
Push — master ( fc4224...debade )
by Sébastien
04:20
created

FFprobeProcess::buildCommand()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 6
ccs 5
cts 5
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\Process;
6
7
use Soluble\MediaTools\Config\FFProbeConfig;
8
9
class FFprobeProcess extends AbstractProcess
10
{
11
    /** @var FFProbeConfig */
12
    protected $config;
13
14 1
    public function __construct(FFProbeConfig $config)
15
    {
16 1
        $this->config = $config;
17 1
    }
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 1
    public function buildCommand(array $arguments): string
30
    {
31 1
        return sprintf(
32 1
            '%s %s',
33 1
            $this->config->getBinary(),
34 1
            implode(' ', $arguments)
35
        );
36
    }
37
}
38