protected function parseConfigurationFile(InputInterface $input)
{
$paths = array('phpspec.yml', 'phpspec.yml.dist');
if ($customPath = $input->getParameterOption(array('-c', '--config'))) {
if (!file_exists($customPath)) {
throw new RuntimeException('Custom configuration file not found at ' . $customPath);
}
$paths = array($customPath);
}
$config = $this->extractConfigFromFirstParsablePath($paths);
if ($homeFolder = getenv('HOME')) {
$config = array_replace_recursive($this->parseConfigFromExistingPath($homeFolder . '/.phpspec.yml'), $config);
}
return $config;
}