1 | <?php |
||
24 | class Provider implements ProviderContract |
||
25 | { |
||
26 | /** |
||
27 | * Holds an instance of the Run. |
||
28 | * |
||
29 | * @var \Whoops\RunInterface |
||
30 | */ |
||
31 | protected $run; |
||
32 | |||
33 | /** |
||
34 | * Holds an instance of the handler. |
||
35 | * |
||
36 | * @var \NunoMaduro\Collision\Contracts\Handler |
||
37 | */ |
||
38 | protected $handler; |
||
39 | |||
40 | /** |
||
41 | * Creates a new instance of the Provider. |
||
42 | * |
||
43 | * @param \Whoops\RunInterface|null $run |
||
44 | * @param \NunoMaduro\Collision\Contracts\Handler|null $handler |
||
45 | */ |
||
46 | 3 | public function __construct(RunInterface $run = null, HandlerContract $handler = null) |
|
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | 1 | public function register(): ProviderContract |
|
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | 1 | public function getHandler(): HandlerContract |
|
70 | } |
||
71 |
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: