original_string: private function makeMethodNotAllowedResponse(array $methods, Request $request): Promise {
          return call(function () use ($methods, $request) {
              /** @var \Amp\Http\Server\Response $response */
              $response = yield $this->errorHandler->handleError(Status::METHOD_NOT_ALLOWED, null, $request);
              $response->setHeader("allow", \implode(", ", $methods));
              return $response;
          });
      }
code: private function makeMethodNotAllowedResponse(array $methods, Request $request): Promise {
          return call(function () use ($methods, $request) {
              /** @var \Amp\Http\Server\Response $response */
              $response = yield $this->errorHandler->handleError(Status::METHOD_NOT_ALLOWED, null, $request);
              $response->setHeader("allow", \implode(", ", $methods));
              return $response;
          });
      }
code_tokens: private function makeMethodNotAllowedResponse ( array $ methods , Request $ request ) : Promise { return call ( function ( ) use ( $ methods , $ request ) { /** @var \Amp\Http\Server\Response $response */ $ response = yield $ this -> errorHandler -> handleError ( Status :: METHOD_NOT_ALLOWED , null , $ request ) ; $ response -> setHeader ( "allow" , \ implode ( ", " , $ methods ) ) ; return $ response ; } ) ; }
docstring: Create a response if the requested method is not allowed for the matched path.
  
  @param string[] $methods
  @param Request $request
  
  @return Promise<\Amp\Http\Server\Response>
docstring_tokens: Create a response if the requested method is not allowed for the matched path .