src/Psalm/Config.php
public static function loadFromXMLFile($file_path, $base_dir)
    {
        $file_contents = file_get_contents($file_path);

        if ($file_contents === false) {
            throw new \InvalidArgumentException('Cannot open ' . $file_path);
        }

        try {
            $config = self::loadFromXML($base_dir, $file_contents);
            $config->hash = sha1($file_contents);
        } catch (ConfigException $e) {
            throw new ConfigException(
                'Problem parsing ' . $file_path . ":\n" . '  ' . $e->getMessage()
            );
        }

        return $config;
    }
public static function loadFromXMLFile($file_path, $base_dir)
    {
        $file_contents = file_get_contents($file_path);

        if ($file_contents === false) {
            throw new \InvalidArgumentException('Cannot open ' . $file_path);
        }

        try {
            $config = self::loadFromXML($base_dir, $file_contents);
            $config->hash = sha1($file_contents);
        } catch (ConfigException $e) {
            throw new ConfigException(
                'Problem parsing ' . $file_path . ":\n" . '  ' . $e->getMessage()
            );
        }

        return $config;
    }
public static function loadFromXMLFile ( $ file_path , $ base_dir ) { $ file_contents = file_get_contents ( $ file_path ) ; if ( $ file_contents === false ) { throw new \ InvalidArgumentException ( 'Cannot open ' . $ file_path ) ; } try { $ config = self :: loadFromXML ( $ base_dir , $ file_contents ) ; $ config -> hash = sha1 ( $ file_contents ) ; } catch ( ConfigException $ e ) { throw new ConfigException ( 'Problem parsing ' . $ file_path . ":\n" . '  ' . $ e -> getMessage ( ) ) ; } return $ config ; }
Creates a new config object from the file

@param  string           $file_path
@param  string           $base_dir

@return self
Creates a new config object from the file