| Total Complexity | 7 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 7 | trait Skippable |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @param \App\UI\UserInterface $ui |
||
| 11 | * |
||
| 12 | * @return bool |
||
| 13 | */ |
||
| 14 | protected function skip(UserInterface $ui): bool |
||
| 15 | { |
||
| 16 | if ($ui->isDryRun()) { |
||
| 17 | $ui->writeln('<info>[DRY-RUN]</info> Not doing anything...'.PHP_EOL); |
||
| 18 | |||
| 19 | return true; |
||
| 20 | } |
||
| 21 | |||
| 22 | return false; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param \App\UI\UserInterface $ui |
||
| 27 | * @param \App\Collection\Collection $collection |
||
| 28 | * @param string $message |
||
| 29 | * @param string $action |
||
| 30 | * |
||
| 31 | * @return bool |
||
| 32 | */ |
||
| 33 | private function shouldProcess(UserInterface $ui, Collection $collection, string $message, string $action): bool |
||
| 51 | } |
||
| 52 | } |
||
| 53 |