1 | <?php |
||
13 | class SendVerifyEmailListener implements ShouldQueue |
||
14 | { |
||
15 | private $activationService; |
||
16 | |||
17 | /** |
||
18 | * SendVerifyEmailListener constructor. |
||
19 | * @param ActivationService $activationService |
||
20 | */ |
||
21 | public function __construct(ActivationService $activationService) |
||
25 | |||
26 | /** |
||
27 | * Handle the event. |
||
28 | * |
||
29 | * @param Registered $event |
||
30 | * @return void |
||
31 | */ |
||
32 | public function handle(Registered $event) |
||
37 | } |
||
38 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.