| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null): CliApp |
||
| 28 | { |
||
| 29 | $config = $container->get('config')['cli']; |
||
| 30 | $commands = $config['commands'] ?? []; |
||
| 31 | |||
| 32 | $app = new CliApp(); |
||
| 33 | foreach ($commands as $command) { |
||
| 34 | if (! $container->has($command)) { |
||
| 35 | continue; |
||
| 36 | } |
||
| 37 | |||
| 38 | $app->add($container->get($command)); |
||
| 39 | } |
||
| 40 | |||
| 41 | return $app; |
||
| 42 | } |
||
| 43 | } |
||
| 44 |