1 | <?php |
||
12 | class PasswordResetRequestHandler |
||
13 | { |
||
14 | /** |
||
15 | * @var UserRepositoryCollection |
||
16 | */ |
||
17 | private $userRepositoryCollection; |
||
18 | |||
19 | /** |
||
20 | * @var Swift_Mailer |
||
21 | */ |
||
22 | private $mailer; |
||
23 | |||
24 | /** |
||
25 | * @var TranslatorInterface |
||
26 | */ |
||
27 | private $translator; |
||
28 | |||
29 | /** |
||
30 | * @var RouterInterface |
||
31 | */ |
||
32 | private $router; |
||
33 | |||
34 | /** |
||
35 | * PasswordResetRequestHandler constructor. |
||
36 | * |
||
37 | * @param UserRepositoryCollection $userRepositoryCollection |
||
38 | * @param Swift_Mailer $mailer |
||
39 | * @param TranslatorInterface $translator |
||
40 | * @param RouterInterface $router |
||
41 | */ |
||
42 | public function __construct(UserRepositoryCollection $userRepositoryCollection, Swift_Mailer $mailer, TranslatorInterface $translator, RouterInterface $router) |
||
49 | |||
50 | /** |
||
51 | * Creates a password reset token and sends an email to the user. |
||
52 | * |
||
53 | * @param PasswordResetRequest $command |
||
54 | * |
||
55 | * @return int |
||
56 | */ |
||
57 | public function handle(PasswordResetRequest $command) |
||
66 | |||
67 | /** |
||
68 | * Sends the password reset token to the user. |
||
69 | * |
||
70 | * @param UserPasswordReset $user |
||
71 | * |
||
72 | * @return int |
||
73 | */ |
||
74 | private function sendPasswordResetToken(UserPasswordReset $user) |
||
86 | |||
87 | /** |
||
88 | * Creates the password reset message. |
||
89 | * |
||
90 | * @param UserPasswordReset $user |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | private function getPasswordResetMessage(UserPasswordReset $user) |
||
100 | } |
||
101 |
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: