private function determineMethod(array $server): string
    {
        $mapping = [
            'GET' => self::METHOD_GET,
            'POST' => self::METHOD_POST,
            'PUT' => self::METHOD_PUT,
            'PATCH' => self::METHOD_PATCH,
            'DELETE' => self::METHOD_DELETE,
            'HEAD' => self::METHOD_HEAD,
            'OPTIONS' => self::METHOD_OPTIONS,
            'CONNECT' => self::METHOD_CONNECT,
            'TRACE' => self::METHOD_TRACE
        ];

        $method = $server['REQUEST_METHOD'];

        if (array_key_exists($method, $mapping)) {
            return $mapping[$method];
        }

        return self::METHOD_GET;
    }
private function determineMethod(array $server): string
    {
        $mapping = [
            'GET' => self::METHOD_GET,
            'POST' => self::METHOD_POST,
            'PUT' => self::METHOD_PUT,
            'PATCH' => self::METHOD_PATCH,
            'DELETE' => self::METHOD_DELETE,
            'HEAD' => self::METHOD_HEAD,
            'OPTIONS' => self::METHOD_OPTIONS,
            'CONNECT' => self::METHOD_CONNECT,
            'TRACE' => self::METHOD_TRACE
        ];

        $method = $server['REQUEST_METHOD'];

        if (array_key_exists($method, $mapping)) {
            return $mapping[$method];
        }

        return self::METHOD_GET;
    }
private function determineMethod ( array $ server ) : string { $ mapping = [ 'GET' => self :: METHOD_GET , 'POST' => self :: METHOD_POST , 'PUT' => self :: METHOD_PUT , 'PATCH' => self :: METHOD_PATCH , 'DELETE' => self :: METHOD_DELETE , 'HEAD' => self :: METHOD_HEAD , 'OPTIONS' => self :: METHOD_OPTIONS , 'CONNECT' => self :: METHOD_CONNECT , 'TRACE' => self :: METHOD_TRACE ] ; $ method = $ server [ 'REQUEST_METHOD' ] ; if ( array_key_exists ( $ method , $ mapping ) ) { return $ mapping [ $ method ] ; } return self :: METHOD_GET ; }
Determines the used method by using passed server configuration.

@param string[] $server
The server configuration.
@return string The determined method.
Determines the used method by using passed server configuration .