src/Server/RequestFactory.php
protected function getRequestMethod()
    {
        if (isset($this->server['REQUEST_METHOD'])) {
            // check for X-HTTP-Method-Override
            if (isset($this->server['HTTP_X_HTTP_METHOD_OVERRIDE']) && in_array($this->server['HTTP_X_HTTP_METHOD_OVERRIDE'], ['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'PATCH'])) {
                return $this->server['HTTP_X_HTTP_METHOD_OVERRIDE'];
            } else {
                return $this->server['REQUEST_METHOD'];
            }
        } else {
            return 'GET';
        }
    }
protected function getRequestMethod()
    {
        if (isset($this->server['REQUEST_METHOD'])) {
            // check for X-HTTP-Method-Override
            if (isset($this->server['HTTP_X_HTTP_METHOD_OVERRIDE']) && in_array($this->server['HTTP_X_HTTP_METHOD_OVERRIDE'], ['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'PATCH'])) {
                return $this->server['HTTP_X_HTTP_METHOD_OVERRIDE'];
            } else {
                return $this->server['REQUEST_METHOD'];
            }
        } else {
            return 'GET';
        }
    }
protected function getRequestMethod ( ) { if ( isset ( $ this -> server [ 'REQUEST_METHOD' ] ) ) { // check for X-HTTP-Method-Override if ( isset ( $ this -> server [ 'HTTP_X_HTTP_METHOD_OVERRIDE' ] ) && in_array ( $ this -> server [ 'HTTP_X_HTTP_METHOD_OVERRIDE' ] , [ 'OPTIONS' , 'GET' , 'HEAD' , 'POST' , 'PUT' , 'DELETE' , 'PATCH' ] ) ) { return $ this -> server [ 'HTTP_X_HTTP_METHOD_OVERRIDE' ] ; } else { return $ this -> server [ 'REQUEST_METHOD' ] ; } } else { return 'GET' ; } }
Tries to detect the current request method. It considers the
X-HTTP-METHOD-OVERRIDE header.

@return string
Tries to detect the current request method . It considers the X - HTTP - METHOD - OVERRIDE header .