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);
    }