Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function testMiddlewareIncluedHandler() |
||
13 | { |
||
14 | $wrappedHandler = $this->throwHandler(); |
||
15 | $request = $this->getRequestMock(); |
||
16 | $response = $this->getResponseMock(); |
||
17 | $middleware = $this->assertedMiddleware($request, $wrappedHandler, $response); |
||
18 | |||
19 | /** |
||
20 | * @var CallableHandler $wrappedHandler |
||
21 | */ |
||
22 | $handler = $wrappedHandler->includeMiddleware($middleware); |
||
23 | Assert::assertInstanceOf(MiddlewareIncluedHandler::class, $handler); |
||
24 | |||
25 | $actualResponse = $handler->handle($request); |
||
26 | Assert::assertSame($response, $actualResponse); |
||
27 | |||
28 | } |
||
29 | } |
||
30 |
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: