Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| DbDiffCommand | |
100.00% |
4 / 4 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| getAllowedAppEnvs | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| handle | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Olz\Command; |
| 4 | |
| 5 | use Olz\Command\Common\OlzCommand; |
| 6 | use Symfony\Component\Console\Attribute\AsCommand; |
| 7 | use Symfony\Component\Console\Command\Command; |
| 8 | use Symfony\Component\Console\Input\InputInterface; |
| 9 | use Symfony\Component\Console\Output\OutputInterface; |
| 10 | |
| 11 | #[AsCommand(name: 'olz:db-diff')] |
| 12 | class DbDiffCommand extends OlzCommand { |
| 13 | /** @return array<string> */ |
| 14 | protected function getAllowedAppEnvs(): array { |
| 15 | return ['dev', 'test']; |
| 16 | } |
| 17 | |
| 18 | protected function handle(InputInterface $input, OutputInterface $output): int { |
| 19 | $out = $this->devDataUtils()->generateMigration(); |
| 20 | $output->write($out); |
| 21 | return Command::SUCCESS; |
| 22 | } |
| 23 | } |