| 1 | <?php |
||
| 24 | class SendRegistrationNotifications |
||
| 25 | { |
||
| 26 | |||
| 27 | /** |
||
| 28 | * |
||
| 29 | * |
||
| 30 | * @var \Core\Mail\MailService |
||
| 31 | */ |
||
| 32 | private $mailer; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * |
||
| 36 | * |
||
| 37 | * @var \Auth\Options\ModuleOptions |
||
| 38 | */ |
||
| 39 | private $options; |
||
| 40 | |||
| 41 | public function __construct(MailService $mailer, ModuleOptions $options) |
||
| 46 | |||
| 47 | public function __invoke(AuthEvent $e) |
||
| 72 | } |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: