1 | <?php |
||
9 | class ExceptionMiddleware |
||
10 | { |
||
11 | /** |
||
12 | * @var \DebugBar\DataCollector\ExceptionsCollector |
||
13 | */ |
||
14 | private $collector; |
||
15 | |||
16 | /** |
||
17 | * ExceptionMiddleware constructor. |
||
18 | * |
||
19 | * @param \DebugBar\DataCollector\ExceptionsCollector $collector |
||
20 | */ |
||
21 | 3 | public function __construct(ExceptionsCollector $collector) |
|
25 | |||
26 | /** |
||
27 | * @param callable $handler |
||
28 | * |
||
29 | * @return callable |
||
30 | */ |
||
31 | 3 | public function __invoke(callable $handler) |
|
44 | } |
||
45 |
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: