src/Psalm/Config.php
public static function getConfigForPath($path, $base_dir, $output_format)
    {
        $config_path = self::locateConfigFile($path);

        if (!$config_path) {
            if ($output_format === ProjectAnalyzer::TYPE_CONSOLE) {
                exit(
                    'Could not locate a config XML file in path ' . $path . '. Have you run \'psalm --init\' ?' .
                    PHP_EOL
                );
            }
            throw new ConfigException('Config not found for path ' . $path);
        }

        return self::loadFromXMLFile($config_path, $base_dir);
    }
public static function getConfigForPath($path, $base_dir, $output_format)
    {
        $config_path = self::locateConfigFile($path);

        if (!$config_path) {
            if ($output_format === ProjectAnalyzer::TYPE_CONSOLE) {
                exit(
                    'Could not locate a config XML file in path ' . $path . '. Have you run \'psalm --init\' ?' .
                    PHP_EOL
                );
            }
            throw new ConfigException('Config not found for path ' . $path);
        }

        return self::loadFromXMLFile($config_path, $base_dir);
    }
public static function getConfigForPath ( $ path , $ base_dir , $ output_format ) { $ config_path = self :: locateConfigFile ( $ path ) ; if ( ! $ config_path ) { if ( $ output_format === ProjectAnalyzer :: TYPE_CONSOLE ) { exit ( 'Could not locate a config XML file in path ' . $ path . '. Have you run \'psalm --init\' ?' . PHP_EOL ) ; } throw new ConfigException ( 'Config not found for path ' . $ path ) ; } return self :: loadFromXMLFile ( $ config_path , $ base_dir ) ; }
Gets a Config object from an XML file.

Searches up a folder hierarchy for the most immediate config.

@param  string $path
@param  string $base_dir
@param  string $output_format

@throws ConfigException if a config path is not found

@return Config
@psalm-suppress MixedArgument
Gets a Config object from an XML file .