public function isValidFile($file) { foreach ($this->settings->getSkipPaths() as $path) { if (strpos($file, $path) === 0) { return false; } } return true; }
/** * @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; }
/** * @param $gitUrl * @return string */ protected function getPathToForRepositoryUrl($gitUrl) { return $this->settings->getRepositoryStoragePath() . md5($gitUrl); }