response = $response; $this->next = $next; } public function __invoke(ServerRequestInterface $request): ResponseInterface { return call_user_func($this->next, $request, $this->response); } }