public static function getMethod(array $server): string
    {
        $method = $server['REQUEST_METHOD'] ?? 'GET';
        if ($method === 'POST' &&
            isset(
                $server['HTTP_X_HTTP_METHOD_OVERRIDE'],
                self::$methods[$server['HTTP_X_HTTP_METHOD_OVERRIDE']]
            )
        ) {
            $method = $server['HTTP_X_HTTP_METHOD_OVERRIDE'];
        }

        return $method;
    }