original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Create new Schema instance based on file.
  
  @param  string $path
  @param  bool   $json
  @return Mrluke\Configuration\Schema
docstring_tokens: Create new Schema instance based on file .