/** * Load config * * @param string $file * @return ConfigInstance * @throws \PreCommit\Exception */ protected function loadConfig($file) { if (!file_exists($file)) { $this->writeEmptyXmlFile($file); } return ConfigInstance::loadInstance(['file' => $file], false); }
/** * Load config * * @param string $file * @return Config * @throws \PreCommit\Exception */ protected function loadConfig($file) { if (!file_exists($file)) { //@startSkipCommitHooks $xml = <<<XML <?xml version="1.0"?> <config> </config> XML; //@finishSkipCommitHooks $this->writeContent($file, $xml); } $config = Config::loadInstance(array('file' => $file), false); return $config; }