| Total Complexity | 3 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class CleanupCommand extends AbstractCommand implements IAggregatorAwareCommand |
||
| 19 | { |
||
| 20 | |||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | */ |
||
| 24 | protected function configure() |
||
| 25 | { |
||
| 26 | $this |
||
| 27 | ->setName('cleanup') |
||
| 28 | ->setDescription( |
||
| 29 | 'Recursively clean up the working copy, removing locks, resuming unfinished operations, etc.' |
||
| 30 | ) |
||
| 31 | ->addArgument( |
||
| 32 | 'path', |
||
| 33 | InputArgument::OPTIONAL, |
||
| 34 | 'Working copy path', |
||
| 35 | '.' |
||
| 36 | ); |
||
| 37 | |||
| 38 | parent::configure(); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * {@inheritdoc} |
||
| 43 | */ |
||
| 44 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 45 | { |
||
| 46 | $wc_path = $this->getWorkingCopyPath(); |
||
| 47 | |||
| 48 | $this->io->writeln('Cleaning up working copy ... '); |
||
| 49 | $command = $this->repositoryConnector->getCommand('cleanup', array($wc_path)); |
||
| 50 | $command->runLive(array( |
||
| 51 | $wc_path => '.', |
||
| 52 | )); |
||
| 53 | $this->io->writeln('<info>Done</info>'); |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Returns option names, that makes sense to use in aggregation mode. |
||
| 58 | * |
||
| 59 | * @return array |
||
| 60 | */ |
||
| 61 | public function getAggregatedOptions() |
||
| 64 | } |
||
| 65 | |||
| 66 | } |
||
| 67 |