| Conditions | 5 |
| Paths | 5 |
| Total Lines | 27 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 29 | { |
||
| 30 | foreach (['config_cache_path', 'cli_config_cache_path'] as $key) { |
||
| 31 | if (! isset($this->config[$key])) { |
||
| 32 | $output->writeln("<comment>No configuration cache path found</comment>"); |
||
| 33 | continue; |
||
| 34 | } |
||
| 35 | |||
| 36 | if (! file_exists($this->config[$key])) { |
||
| 37 | $output->writeln(sprintf( |
||
| 38 | "<error>Configured config cache file '%s' not found</error>", |
||
| 39 | $this->config[$key] |
||
| 40 | )); |
||
| 41 | continue; |
||
| 42 | } |
||
| 43 | |||
| 44 | if (false === unlink($this->config[$key])) { |
||
| 45 | $output->writeln(sprintf( |
||
| 46 | "<error>Error removing config cache file '%s'</error>", |
||
| 47 | $this->config[$key] |
||
| 48 | )); |
||
| 49 | continue; |
||
| 50 | } |
||
| 51 | |||
| 52 | $output->writeln(sprintf( |
||
| 53 | "<info>Removed configured config cache file '%s'</info>", |
||
| 54 | $this->config[$key] |
||
| 55 | )); |
||
| 59 |