src/DunitCommand.php
private function mergeConfigFileIntoOptions($options, $configFile)
    {
        $configFile = ($configFile) ?: realpath(getcwd()).'/.dunitconfig';
        if (file_exists($configFile) && is_readable($configFile)) {
            if (false !== ($settings = parse_ini_file($configFile))) {
                return array_merge($options, $settings);
            }
        }
        throw new Exception(
            'WARNING: Config file could not be read. Falling back to built-in defaults.'
        );
    }
private function mergeConfigFileIntoOptions($options, $configFile)
    {
        $configFile = ($configFile) ?: realpath(getcwd()).'/.dunitconfig';
        if (file_exists($configFile) && is_readable($configFile)) {
            if (false !== ($settings = parse_ini_file($configFile))) {
                return array_merge($options, $settings);
            }
        }
        throw new Exception(
            'WARNING: Config file could not be read. Falling back to built-in defaults.'
        );
    }
private function mergeConfigFileIntoOptions ( $ options , $ configFile ) { $ configFile = ( $ configFile ) ? : realpath ( getcwd ( ) ) . '/.dunitconfig' ; if ( file_exists ( $ configFile ) && is_readable ( $ configFile ) ) { if ( false !== ( $ settings = parse_ini_file ( $ configFile ) ) ) { return array_merge ( $ options , $ settings ) ; } } throw new Exception ( 'WARNING: Config file could not be read. Falling back to built-in defaults.' ) ; }
Merges the default options with values from the config file specified.
@param array $options The current options.
@param string $configFile The path to the config file. If the config
file specified is not valid the method will fall back to the
default config file location (./.dunitconfig)
@return array Returns the array of merged settings.
@throws Exception Throws an exception if no config file can be found.
Merges the default options with values from the config file specified .