Esempio n. 1
0
 /**
  * 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;
 }
Esempio n. 2
0
 /**
  * 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;
 }