protected function createMethodNotAllowedResponse(Request $request) { return $this->methodNotAllowed ? call_user_func($this->methodNotAllowed, $request) : $this->createErrorResponse('Method not allowed.', 405); }