| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 4 | public function __invoke(ContainerInterface $container): FFProbeConfig |
|
| 16 | { |
||
| 17 | 4 | $key = 'ffprobe.binary'; |
|
| 18 | 4 | $config = $container->get('config')['soluble-mediatools'] ?? []; |
|
| 19 | 4 | if (!isset($config[$key]) || trim((string) $config[$key]) === '') { |
|
| 20 | 2 | throw new InvalidConfigException( |
|
| 21 | 2 | sprintf( |
|
| 22 | 2 | 'The [\'%s\'] value is missing in config [\'soluble-mediatools\']', |
|
| 23 | 2 | $key |
|
| 24 | ) |
||
| 25 | ); |
||
| 26 | } |
||
| 27 | |||
| 28 | 2 | return new FFProbeConfig($config[$key]); |
|
| 29 | } |
||
| 31 |