1 | <?php |
||
17 | class RouteResolverMiddleware implements ServerMiddlewareInterface |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * The session manager. |
||
22 | * |
||
23 | * @var Router |
||
24 | */ |
||
25 | protected $router; |
||
26 | |||
27 | /** |
||
28 | * Create a new session middleware. |
||
29 | * |
||
30 | * @param Router $router |
||
31 | */ |
||
32 | 1 | public function __construct(Router $router) |
|
36 | |||
37 | /** |
||
38 | * @inheritdoc |
||
39 | * @param Request $request |
||
40 | */ |
||
41 | 1 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
51 | |||
52 | /** |
||
53 | * @param Request $request |
||
54 | * @param $params |
||
55 | */ |
||
56 | protected function populateRequest($request, $params) |
||
75 | |||
76 | /** |
||
77 | * @return Router |
||
78 | */ |
||
79 | 1 | public function getRouter(): Router |
|
83 | } |
||
84 |
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: