Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
ApiGenerateCommand
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 3
12
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getAllowedAppEnvs
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 handle
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Olz\Command;
4
5use Olz\Api\OlzApi;
6use Olz\Command\Common\OlzCommand;
7use Symfony\Component\Console\Attribute\AsCommand;
8use Symfony\Component\Console\Command\Command;
9use Symfony\Component\Console\Input\InputInterface;
10use Symfony\Component\Console\Output\OutputInterface;
11
12#[AsCommand(name: 'olz:api-generate')]
13class 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}