Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function __invoke($args = []) |
||
18 | { |
||
19 | $result = []; |
||
20 | |||
21 | foreach ($this->container->get('commands') as $code => $className) { |
||
22 | $command = $this->container->resolve($className); |
||
23 | |||
24 | $result[$code] = [ |
||
25 | 'name' => $command->getName(), |
||
26 | 'description' => $command->getDescription(), |
||
27 | 'help' => $command->getHelp(), |
||
28 | 'arguments' => $this->constructArguments($command), |
||
29 | 'options' => $this->constructOptions($command), |
||
30 | 'info' => $command->getInfo() |
||
31 | ]; |
||
32 | } |
||
33 | |||
34 | return json_encode($result); |
||
35 | } |
||
65 |