Use stricter type-hinting
This commit is contained in:
parent
f60d8829b6
commit
7e0c7dd9cc
|
@ -38,7 +38,7 @@ abstract class AbstractMiddleware implements MiddlewareInterface
|
||||||
/**
|
/**
|
||||||
* The PSR-15 Server Request Handler.
|
* The PSR-15 Server Request Handler.
|
||||||
*/
|
*/
|
||||||
protected RequestHandlerInterface $handler;
|
protected QueueRequestHandler $requestHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process an incoming server request and produce a response.
|
* Process an incoming server request and produce a response.
|
||||||
|
@ -51,7 +51,8 @@ abstract class AbstractMiddleware implements MiddlewareInterface
|
||||||
*/
|
*/
|
||||||
final public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
final public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||||
{
|
{
|
||||||
$this->handler = $handler;
|
/** @var QueueRequestHandler $handler */
|
||||||
|
$this->requestHandler = $handler;
|
||||||
// Manipulate request if necessary.
|
// Manipulate request if necessary.
|
||||||
$request = $this->processRequest($request);
|
$request = $this->processRequest($request);
|
||||||
// Delegate request to next middleware and get response.
|
// Delegate request to next middleware and get response.
|
||||||
|
|
Loading…
Reference in New Issue