| Total Complexity | 6 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class ConsoleDependencyProvider extends XerviceConsoleDependencyProvider |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @return array |
||
| 15 | */ |
||
| 16 | protected function getCommandList(): array |
||
| 17 | { |
||
| 18 | return $this->getDockerClientCommands(); |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @return array |
||
| 23 | */ |
||
| 24 | private function getDockerClientCommands(): array |
||
| 25 | { |
||
| 26 | $commands = [ |
||
| 27 | new GenerateCommand() |
||
| 28 | ]; |
||
| 29 | |||
| 30 | $commands = $this->addDevelopmentCommands($commands); |
||
| 31 | |||
| 32 | foreach ($this->getCommandProvider() as $provider) { |
||
| 33 | $commands = $provider->provideCommands($commands); |
||
| 34 | } |
||
| 35 | |||
| 36 | return $commands; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return \Nexus\Console\Provider\CommandProviderInterface[] |
||
| 41 | */ |
||
| 42 | private function getCommandProvider(): array |
||
| 43 | { |
||
| 44 | return [ |
||
| 45 | new DynamicModulesCommandProvider() |
||
| 46 | ]; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param array $commands |
||
| 51 | * |
||
| 52 | * @return array |
||
| 53 | * @throws \Symfony\Component\Console\Exception\LogicException |
||
| 54 | */ |
||
| 55 | private function addDevelopmentCommands(array $commands): array |
||
| 61 | } |
||
| 62 | } |