| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | protected function execute(InputInterface $input, OutputInterface $output): int |
||
| 39 | { |
||
| 40 | if (false === $this->s3Client->hasCache()) { |
||
| 41 | throw new \Exception('Cache in not enabled. You have to enable caching to use this command'); |
||
| 42 | } |
||
| 43 | |||
| 44 | if (true === $this->s3Client->getCache()->flushAll()) { |
||
| 45 | $output->writeln('<fg=green>Cache was successful flushed.</>'); |
||
| 46 | |||
| 47 | return 0; |
||
| 48 | } else { |
||
| 49 | $output->writeln('<fg=red>Error during cache flushing.</>'); |
||
| 50 | |||
| 51 | return 1; |
||
| 52 | } |
||
| 55 |