Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
ApiGenerateCommand | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getAllowedAppEnvs | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
handle | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Olz\Command; |
4 | |
5 | use Olz\Api\OlzApi; |
6 | use Olz\Command\Common\OlzCommand; |
7 | use Symfony\Component\Console\Attribute\AsCommand; |
8 | use Symfony\Component\Console\Command\Command; |
9 | use Symfony\Component\Console\Input\InputInterface; |
10 | use Symfony\Component\Console\Output\OutputInterface; |
11 | |
12 | #[AsCommand(name: 'olz:api-generate')] |
13 | class ApiGenerateCommand extends OlzCommand { |
14 | public function __construct(protected OlzApi $olzApi) { |
15 | parent::__construct(); |
16 | } |
17 | |
18 | /** @return array<string> */ |
19 | protected function getAllowedAppEnvs(): array { |
20 | return ['dev', 'test']; |
21 | } |
22 | |
23 | protected function handle(InputInterface $input, OutputInterface $output): int { |
24 | $this->olzApi->generate(); |
25 | return Command::SUCCESS; |
26 | } |
27 | } |