| Conditions | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 48 | 12 | private function guardServiceAvailability(ContainerInterface $container): void |
|
| 49 | { |
||
| 50 | $requiredServices = [ |
||
| 51 | 12 | InputInterface::class, |
|
| 52 | PassthruRunner::class, |
||
| 53 | DryRunner::class, |
||
| 54 | ]; |
||
| 55 | |||
| 56 | 12 | foreach ($requiredServices as $serviceId) { |
|
| 57 | 12 | if (!$container->has($serviceId)) { |
|
| 58 | throw new class(\sprintf('The service "%s" is missing.', $serviceId)) extends \LogicException implements ContainerExceptionInterface { |
||
| 59 | }; |
||
| 64 |