public function createConfig($path = '') : Config
    {
        $path       = $path ?: getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG;
        $json       = new Json($path);
        $fileExists = $json->exists();
        $config     = new Config($path, $fileExists);

        if ($fileExists) {
            $this->configure($config, $json->readAssoc());
        }

        return $config;
    }
public function createConfig($path = '') : Config
    {
        $path       = $path ?: getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG;
        $json       = new Json($path);
        $fileExists = $json->exists();
        $config     = new Config($path, $fileExists);

        if ($fileExists) {
            $this->configure($config, $json->readAssoc());
        }

        return $config;
    }
public function createConfig ( $ path = '' ) : Config { $ path = $ path ? : getcwd ( ) . DIRECTORY_SEPARATOR . CH :: CONFIG ; $ json = new Json ( $ path ) ; $ fileExists = $ json -> exists ( ) ; $ config = new Config ( $ path , $ fileExists ) ; if ( $ fileExists ) { $ this -> configure ( $ config , $ json -> readAssoc ( ) ) ; } return $ config ; }
Create a CaptainHook configuration

@param  string $path
@return \CaptainHook\App\Config
@throws \Exception
Create a CaptainHook configuration