Conditions | 4 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function addImportCommand(Event $event): void |
||
38 | { |
||
39 | /** @var Application $cliApplication */ |
||
40 | $cliApplication = $event->getTarget(); |
||
41 | |||
42 | $container = $event->getParam('ServiceManager', null); |
||
43 | |||
44 | if ( |
||
45 | null === $container |
||
46 | || ! $container instanceof ContainerInterface |
||
47 | || ! $container->has(ImportCommand::class) |
||
48 | ) { |
||
49 | return; |
||
50 | } |
||
51 | |||
52 | ConsoleRunner::addCommands($cliApplication); |
||
53 | |||
54 | $cliApplication->add($container->get(ImportCommand::class)); |
||
55 | } |
||
65 |