| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| 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 | ]; |
||
| 31 | } |
||
| 32 | |||
| 33 | return json_encode($result); |
||
| 34 | } |
||
| 64 |