| Conditions | 3 |
| Paths | 2 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.576 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 1 | protected function getFFMpegConfig(ContainerInterface $container): FFMpegConfig |
|
| 13 | { |
||
| 14 | 1 | $key = 'ffmpeg.binary'; |
|
| 15 | 1 | $config = $container->get('config')['soluble-mediatools'] ?? []; |
|
| 16 | |||
| 17 | 1 | if (!isset($config[$key]) || trim($config[$key]) === '') { |
|
| 18 | throw new InvalidConfigException( |
||
| 19 | sprintf( |
||
| 20 | 'The [\'%s\'] value is missing in config [\'soluble-mediatools\']', |
||
| 21 | $key |
||
| 22 | ) |
||
| 23 | ); |
||
| 24 | } |
||
| 25 | 1 | $threads = $config['ffmpeg.threads'] ?? null; |
|
| 26 | |||
| 27 | 1 | return new FFMpegConfig($config[$key], $threads); |
|
| 28 | } |
||
| 46 |