| Conditions | 5 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 33 | private function shouldProcess(UserInterface $ui, Collection $collection, string $message, string $action): bool |
||
| 34 | { |
||
| 35 | if ($collection->isEmpty()) { |
||
| 36 | $ui->writeln(sprintf($ui->indent().'<comment>Nothing to %s.</comment>'.PHP_EOL, $action)); |
||
| 37 | |||
| 38 | return false; |
||
| 39 | } |
||
| 40 | |||
| 41 | $ui->writeln($message); |
||
| 42 | |||
| 43 | $ui->write($ui->indent()); |
||
| 44 | if ($this->skip($ui) || !$ui->confirm()) { |
||
| 45 | $ui->writeln(($ui->isDryRun() ? '' : PHP_EOL).'<info>Done.</info>'.PHP_EOL); |
||
| 46 | |||
| 47 | return false; |
||
| 48 | } |
||
| 49 | |||
| 50 | return true; |
||
| 51 | } |
||
| 53 |