protected function getConfig(string $path = '', bool $failIfNotFound = false) : Config
    {
        $this->config = Config\Factory::create($path);

        if ($failIfNotFound && !$this->config->isLoadedFromFile()) {
            throw new \RuntimeException(
                'Please create a captainhook configuration first' . PHP_EOL .
                'Run \'captainhook configure\'' . PHP_EOL .
                'If you have a configuration located elsewhere use the --configuration option'
            );
        }
        return $this->config;
    }
protected function getConfig(string $path = '', bool $failIfNotFound = false) : Config
    {
        $this->config = Config\Factory::create($path);

        if ($failIfNotFound && !$this->config->isLoadedFromFile()) {
            throw new \RuntimeException(
                'Please create a captainhook configuration first' . PHP_EOL .
                'Run \'captainhook configure\'' . PHP_EOL .
                'If you have a configuration located elsewhere use the --configuration option'
            );
        }
        return $this->config;
    }
protected function getConfig ( string $ path = '' , bool $ failIfNotFound = false ) : Config { $ this -> config = Config \ Factory :: create ( $ path ) ; if ( $ failIfNotFound && ! $ this -> config -> isLoadedFromFile ( ) ) { throw new \ RuntimeException ( 'Please create a captainhook configuration first' . PHP_EOL . 'Run \'captainhook configure\'' . PHP_EOL . 'If you have a configuration located elsewhere use the --configuration option' ) ; } return $ this -> config ; }
CaptainHook config getter

@param  string $path
@param  bool   $failIfNotFound
@return \CaptainHook\App\Config
CaptainHook config getter