src/RoutingFailedResponder.php
protected function methodNotAllowed(
        Request $request,
        Response $response,
        Route $route
    ) {
        $request;
        $response = $response->withStatus(405)
            ->withHeader('Allow', implode(', ', $route->allows))
            ->withHeader('Content-Type', 'application/json');
        $response->getBody()->write(json_encode($route->allows));
        return $response;
    }
protected function methodNotAllowed(
        Request $request,
        Response $response,
        Route $route
    ) {
        $request;
        $response = $response->withStatus(405)
            ->withHeader('Allow', implode(', ', $route->allows))
            ->withHeader('Content-Type', 'application/json');
        $response->getBody()->write(json_encode($route->allows));
        return $response;
    }
protected function methodNotAllowed ( Request $ request , Response $ response , Route $ route ) { $ request ; $ response = $ response -> withStatus ( 405 ) -> withHeader ( 'Allow' , implode ( ', ' , $ route -> allows ) ) -> withHeader ( 'Content-Type' , 'application/json' ) ; $ response -> getBody ( ) -> write ( json_encode ( $ route -> allows ) ) ; return $ response ; }
Method not allowed

Builds the Response when the failed route method was not allowed.

@param Request  $request  PSR7 Request
@param Response $response PSR7 Response
@param Route    $route    Failed Route

@return Response

@access protected
Method not allowed