/** * Get cached config files * * @return array * @throws \PreCommit\Exception */ protected function getCachedConfigFiles() { $finder = new Finder(); $list = []; foreach ($finder->files()->in(ConfigInstance::getCacheDir())->name('*.xml') as $file) { $list[] = $file->getRealpath(); } return $list; }
/** * Get issue cache directories * * @return array * @throws \PreCommit\Exception */ protected function getCachedIssueDirs() { $finder = new Finder(); $list = array(); /** @var \Symfony\Component\Finder\SplFileInfo $file */ foreach ($finder->directories()->in(ConfigInstance::getCacheDir())->path('/^issue-.*/') as $file) { $list[] = $file->getRealpath(); } return $list; }