| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 51 | { |
||
| 52 | $config = $this->config; |
||
| 53 | $cacheDir = $config->get('dotfiles.cache_dir'); |
||
| 54 | |||
| 55 | $finder = Finder::create() |
||
| 56 | ->in($cacheDir) |
||
| 57 | ->files() |
||
| 58 | ; |
||
| 59 | |||
| 60 | $fs = new Filesystem(); |
||
| 61 | |||
| 62 | /* @var \Symfony\Component\Finder\SplFileInfo $file */ |
||
| 63 | foreach($finder->files() as $file){ |
||
| 64 | $fs->remove($file); |
||
| 65 | $relPath = 'var/cache/'.$file->getRelativePathname(); |
||
| 66 | $this->logger->debug("-removed <comment>$relPath</comment>"); |
||
| 67 | } |
||
| 70 |