| 1 | <?php |
||
| 16 | class RouteResolverMiddleware implements ServerMiddlewareInterface |
||
| 17 | { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The session manager. |
||
| 21 | * |
||
| 22 | * @var Router |
||
| 23 | */ |
||
| 24 | protected $router; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Create a new session middleware. |
||
| 28 | * |
||
| 29 | * @param Router $router |
||
| 30 | */ |
||
| 31 | 1 | public function __construct(Router $router) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @inheritdoc |
||
| 38 | * @param Request $request |
||
| 39 | */ |
||
| 40 | 1 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
| 49 | |||
| 50 | /** |
||
| 51 | * @param Request $request |
||
| 52 | * @param $params |
||
| 53 | */ |
||
| 54 | protected function populateRequest($request, $params) |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return Router |
||
| 76 | */ |
||
| 77 | 1 | public function getRouter(): Router |
|
| 81 | } |
||
| 82 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: