userator /
deploid
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Deploid\Command; |
||
| 4 | |||
| 5 | use Symfony\Component\Console\Command\Command; |
||
| 6 | use Symfony\Component\Console\Input\InputInterface; |
||
| 7 | use Symfony\Component\Console\Output\OutputInterface; |
||
| 8 | use Symfony\Component\Console\Input\InputArgument; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @method \Deploid\Application getApplication() return application object |
||
| 12 | */ |
||
| 13 | class StructureValidate extends Command { |
||
| 14 | |||
| 15 | protected function configure() { |
||
| 16 | $this->setName('structure:validate'); |
||
| 17 | $this->setDescription('Validate existing directory structure'); |
||
| 18 | $this->setHelp('This command validate existing directory structure in the specified path'); |
||
| 19 | $this->addArgument('path', InputArgument::OPTIONAL, 'path to target directory', getcwd()); |
||
| 20 | } |
||
| 21 | |||
| 22 | protected function execute(InputInterface $input, OutputInterface $output) { |
||
| 23 | $payload = $this->getApplication()->deploidStructureValidate($input->getArgument('path')); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 24 | $output->writeln($payload->getMessage()); |
||
| 25 | return $payload->getCode(); |
||
| 26 | } |
||
| 27 | |||
| 28 | } |