Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.7898 |
Changes | 0 |
1 | <?php |
||
30 | 1 | protected function getFFProbeConfig(ContainerInterface $container): FFProbeConfig |
|
31 | { |
||
32 | 1 | $key = 'ffprobe.binary'; |
|
33 | 1 | $config = $container->get('config')['soluble-mediatools'] ?? []; |
|
34 | 1 | if (!isset($config[$key]) || trim($config[$key]) === '') { |
|
35 | throw new InvalidConfigException( |
||
36 | sprintf( |
||
37 | 'The [\'%s\'] value is missing in config [\'soluble-mediatools\']', |
||
38 | $key |
||
39 | ) |
||
40 | ); |
||
41 | } |
||
42 | |||
43 | 1 | return new FFProbeConfig($config[$key]); |
|
44 | } |
||
46 |