Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
13 | 1 | public function __invoke(ContainerInterface $container): CliApp |
|
14 | { |
||
15 | 1 | $config = $container->get('config')['cli']; |
|
16 | 1 | $appOptions = $container->get(AppOptions::class); |
|
17 | |||
18 | 1 | $commands = $config['commands'] ?? []; |
|
19 | 1 | $app = new CliApp($appOptions->getName(), $appOptions->getVersion()); |
|
20 | 1 | $app->setCommandLoader(new ContainerCommandLoader($container, $commands)); |
|
21 | |||
22 | 1 | return $app; |
|
23 | } |
||
25 |