original_string: public function getMethod()
      {
          // Get actual request method
          $method = $this->env->get('REQUEST_METHOD');
          $methodOverride = $this->headers->get('HTTP_X_HTTP_METHOD_OVERRIDE');
  
          // Detect method override (by HTTP header or POST parameter)
          if (!empty($methodOverride)) {
              $method = strtoupper($methodOverride);
          } else if ($method === static::METHOD_POST) {
              $customMethod = $this->post(static::METHOD_OVERRIDE, false);
              if ($customMethod !== false) {
                  $method = strtoupper($customMethod);
              }
          }
  
          return $method;
      }
code: public function getMethod()
      {
          // Get actual request method
          $method = $this->env->get('REQUEST_METHOD');
          $methodOverride = $this->headers->get('HTTP_X_HTTP_METHOD_OVERRIDE');
  
          // Detect method override (by HTTP header or POST parameter)
          if (!empty($methodOverride)) {
              $method = strtoupper($methodOverride);
          } else if ($method === static::METHOD_POST) {
              $customMethod = $this->post(static::METHOD_OVERRIDE, false);
              if ($customMethod !== false) {
                  $method = strtoupper($customMethod);
              }
          }
  
          return $method;
      }
code_tokens: public function getMethod ( ) { // Get actual request method $ method = $ this -> env -> get ( 'REQUEST_METHOD' ) ; $ methodOverride = $ this -> headers -> get ( 'HTTP_X_HTTP_METHOD_OVERRIDE' ) ; // Detect method override (by HTTP header or POST parameter) if ( ! empty ( $ methodOverride ) ) { $ method = strtoupper ( $ methodOverride ) ; } else if ( $ method === static :: METHOD_POST ) { $ customMethod = $ this -> post ( static :: METHOD_OVERRIDE , false ) ; if ( $ customMethod !== false ) { $ method = strtoupper ( $ customMethod ) ; } } return $ method ; }
docstring: Get HTTP method
  
  @return string
  @api
docstring_tokens: Get HTTP method