Total Complexity | 6 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class GetCommand |
||
9 | { |
||
10 | protected $container; |
||
11 | |||
12 | protected $commands; |
||
13 | |||
14 | public function __construct(AppContainer $appContainer) |
||
15 | { |
||
16 | $this->container = $appContainer; |
||
17 | $this->commands = $this->container->resolve('commands'); |
||
18 | } |
||
19 | |||
20 | public function __invoke($args) |
||
28 | ]); |
||
29 | } |
||
30 | |||
31 | public function constructArguments(BaseCommand $command) |
||
32 | { |
||
33 | $result = []; |
||
34 | |||
35 | foreach ($command->getDefinition()->getArguments() as $argument) { |
||
36 | $result[] = [ |
||
37 | 'name' => $argument->getName(), |
||
38 | 'description' => $argument->getDescription() |
||
39 | ]; |
||
40 | } |
||
41 | |||
42 | return $result; |
||
43 | } |
||
44 | |||
45 | public function constructOptions(BaseCommand $command) |
||
57 | } |
||
58 | } |
||
59 |