The expression return $this->response could return the type null which is incompatible with the type-hinted return Psr\Http\Message\ResponseInterface. Consider adding an additional type-check to rule them out.
Loading history...
28
}
29
30
1
protected function forward(string $target): void
31
{
32
1
$f = new Forward($this->request, $this->response);
It seems like $this->response can also be of type null; however, parameter $response of WebPresentation\Forward::__construct() does only seem to accept Psr\Http\Message\ResponseInterface, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
32
$f = new Forward($this->request, /** @scrutinizer ignore-type */ $this->response);
It seems like $this->request can also be of type null; however, parameter $request of WebPresentation\Forward::__construct() does only seem to accept Psr\Http\Message\ServerRequestInterface, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
32
$f = new Forward(/** @scrutinizer ignore-type */ $this->request, $this->response);