| 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 | 3 | public function __construct(RunInterface $run = null, HandlerContract $handler = null) |
|
| 48 | |||
| 49 | /** |
||
| 50 | * {@inheritdoc} |
||
| 51 | */ |
||
| 52 | 1 | public function register(): ProviderContract |
|
| 59 | |||
| 60 | /** |
||
| 61 | * {@inheritdoc} |
||
| 62 | */ |
||
| 63 | 1 | public function getHandler(): HandlerContract |
|
| 67 | } |
||
| 68 |
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: