| Conditions | 2 |
| Paths | 2 |
| Total Lines | 23 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 39 | { |
||
| 40 | $io = new SymfonyStyle($input, $output); |
||
| 41 | |||
| 42 | $vhost = new Vhost($input->getArgument('vhostFilename')); |
||
| 43 | |||
| 44 | $manager = ManagerFactory::create(); |
||
| 45 | |||
| 46 | $io->warning('The following files are going to be deleted'); |
||
| 47 | |||
| 48 | $io->listing($manager->getGeneratedFiles($vhost)); |
||
| 49 | |||
| 50 | if (!$io->confirm('Do you confirm the removal of the vhost?', true)) { |
||
| 51 | $io->warning('Canceled!! The vhost has not been deleted due to user interruption'); |
||
| 52 | |||
| 53 | return; |
||
| 54 | } |
||
| 55 | |||
| 56 | $manager->deleteVhost($vhost); |
||
| 57 | $manager->restartServer(); |
||
| 58 | |||
| 59 | $io->success('Awesome!! Your vhost has been successfully deleted'); |
||
| 60 | } |
||
| 61 | } |
||
| 62 |