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

FFmpegProcess   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 24
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

3 Methods

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