src/ieu/Http/Request.php
public function getMethod() :? int
  {
    switch($this->server('REQUEST_METHOD')) {
      case 'GET':
        return self::HTTP_GET;
      case 'POST':
        return self::HTTP_POST;
      case 'HEAD':
        return self::HTTP_HEAD;
      case 'PUT':
        return self::HTTP_PUT;
      case 'DELETE':
        return self::HTTP_DELETE;
      case 'TRACE':
        return self::HTTP_TRACE;
      case 'OPTIONS':
        return self::HTTP_OPTIONS;
      case 'CONNECT':
        return self::HTTP_CONNECT;
    }

    return null;
  }
public function getMethod() :? int
  {
    switch($this->server('REQUEST_METHOD')) {
      case 'GET':
        return self::HTTP_GET;
      case 'POST':
        return self::HTTP_POST;
      case 'HEAD':
        return self::HTTP_HEAD;
      case 'PUT':
        return self::HTTP_PUT;
      case 'DELETE':
        return self::HTTP_DELETE;
      case 'TRACE':
        return self::HTTP_TRACE;
      case 'OPTIONS':
        return self::HTTP_OPTIONS;
      case 'CONNECT':
        return self::HTTP_CONNECT;
    }

    return null;
  }
public function getMethod ( ) : ? int { switch ( $ this -> server ( 'REQUEST_METHOD' ) ) { case 'GET' : return self :: HTTP_GET ; case 'POST' : return self :: HTTP_POST ; case 'HEAD' : return self :: HTTP_HEAD ; case 'PUT' : return self :: HTTP_PUT ; case 'DELETE' : return self :: HTTP_DELETE ; case 'TRACE' : return self :: HTTP_TRACE ; case 'OPTIONS' : return self :: HTTP_OPTIONS ; case 'CONNECT' : return self :: HTTP_CONNECT ; } return null ; }
Returns the bit-code of the request method or
null if the method is unknown.

@return int|null
Returns the bit - code of the request method or null if the method is unknown .