src/Schema.php
public static function createFromFile(string $path, bool $json = false): Schema
    {
        static::fileExists($path);

        $schema = $json ? json_decode(file_get_contents($path), true) : include $path;

        if (!is_array($schema)) {
            throw new InvalidArgumentException(
                '[createFromFile] method requires file that return a php array or json.'
            );
        }

        return new static($schema);
    }
public static function createFromFile(string $path, bool $json = false): Schema
    {
        static::fileExists($path);

        $schema = $json ? json_decode(file_get_contents($path), true) : include $path;

        if (!is_array($schema)) {
            throw new InvalidArgumentException(
                '[createFromFile] method requires file that return a php array or json.'
            );
        }

        return new static($schema);
    }
public static function createFromFile ( string $ path , bool $ json = false ) : Schema { static :: fileExists ( $ path ) ; $ schema = $ json ? json_decode ( file_get_contents ( $ path ) , true ) : include $ path ; if ( ! is_array ( $ schema ) ) { throw new InvalidArgumentException ( '[createFromFile] method requires file that return a php array or json.' ) ; } return new static ( $ schema ) ; }
Create new Schema instance based on file.

@param  string $path
@param  bool   $json
@return Mrluke\Configuration\Schema
Create new Schema instance based on file .