src/Acquia/Json/Json.php
public static function parseFile($filepath)
    {
        if (!is_file($filepath)) {
            throw new \RuntimeException('File not found: ' . $filepath);
        }

        if (!$filedata = static::readFiledata($filepath)) {
            throw new \RuntimeException('Error reading file: ' . $filepath);
        }

        if (!$json = self::decode($filedata)) {
            throw new \RuntimeException('Error parsing json: ' . $filepath);
        }

        return $json;
    }
public static function parseFile($filepath)
    {
        if (!is_file($filepath)) {
            throw new \RuntimeException('File not found: ' . $filepath);
        }

        if (!$filedata = static::readFiledata($filepath)) {
            throw new \RuntimeException('Error reading file: ' . $filepath);
        }

        if (!$json = self::decode($filedata)) {
            throw new \RuntimeException('Error parsing json: ' . $filepath);
        }

        return $json;
    }
public static function parseFile ( $ filepath ) { if ( ! is_file ( $ filepath ) ) { throw new \ RuntimeException ( 'File not found: ' . $ filepath ) ; } if ( ! $ filedata = static :: readFiledata ( $ filepath ) ) { throw new \ RuntimeException ( 'Error reading file: ' . $ filepath ) ; } if ( ! $ json = self :: decode ( $ filedata ) ) { throw new \ RuntimeException ( 'Error parsing json: ' . $ filepath ) ; } return $ json ; }
Parses a file into a PHP array.

@param string $filepath

@throws \RuntimeException
Parses a file into a PHP array .