| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 1 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
| 42 | { |
||
| 43 | 1 | $this->getRouter()->setContext((new RequestContext())->fromRequest($request)); |
|
|
|
|||
| 44 | 1 | $return = $this->getRouter()->matchRequest($request); |
|
| 45 | 1 | if ($return['_route']) { |
|
| 46 | $this->populateRequest($request, $return); |
||
| 47 | } |
||
| 48 | |||
| 49 | 1 | return $handler->handle($request); |
|
| 50 | } |
||
| 51 | |||
| 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: