code: protected function allowed($method)
      {
          if (in_array($method, $this->allowed) === false) {
              $message = 'Used method is not allowed';
  
              throw new \UnexpectedValueException($message);
          }
  
          return true;
      }
docs: Checks if the specified method is a valid HTTP method.
  
  @param  string $method
  @return boolean
  
  @throws UnexpectedValueException