Exemplo n.º 1
0
 public function isValidFile($file)
 {
     foreach ($this->settings->getSkipPaths() as $path) {
         if (strpos($file, $path) === 0) {
             return false;
         }
     }
     return true;
 }
Exemplo n.º 2
0
 /**
  * @param bool $loadDefaultSettings Load default settings
  * @return \Swis\GoT\Settings|\Swis\GoT\Settings\DefaultSettings
  */
 public static function create($loadDefaultSettings = true)
 {
     $settings = new Settings();
     if ($loadDefaultSettings === true) {
         $settings->setAvailableParsers([Behat::class, Codeception::class, PhpUnit::class]);
         $settings->setSkipPaths(['vendor/', 'libs/', 'tests/_support/', 'workbench/', 'tests/ExampleTest.php']);
         $settings->setRepositoryStoragePath(rtrim(sys_get_temp_dir(), '/\\') . DIRECTORY_SEPARATOR);
     }
     return $settings;
 }
Exemplo n.º 3
0
 /**
  * @param $gitUrl
  * @return string
  */
 protected function getPathToForRepositoryUrl($gitUrl)
 {
     return $this->settings->getRepositoryStoragePath() . md5($gitUrl);
 }