| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 35 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 36 | { |
||
| 37 | $taskManager = $this->getCommander()->getTaskManager(); |
||
| 38 | |||
| 39 | $tasks = $taskManager->findAllTerminatedTasks(); |
||
| 40 | |||
| 41 | if (0 === count($tasks)) { |
||
| 42 | $output->writeln('No tasks found'); |
||
| 43 | return; |
||
| 44 | } |
||
| 45 | |||
| 46 | foreach ($tasks as $task) { |
||
| 47 | $task->remove(); |
||
| 48 | } |
||
| 49 | |||
| 50 | $output->writeln(sprintf('Removed %s terminated task(s)', count($tasks))); |
||
| 51 | } |
||
| 52 | } |
||
| 53 |