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 UrlGeneratorInterface |
||
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 UrlGeneratorInterface $router |
||
41 | */ |
||
42 | public function __construct( |
||
53 | |||
54 | /** |
||
55 | * Creates a password reset token and sends an email to the user. |
||
56 | * |
||
57 | * @param PasswordResetRequest $command |
||
58 | * |
||
59 | * @return int |
||
60 | */ |
||
61 | public function handle(PasswordResetRequest $command) |
||
70 | |||
71 | /** |
||
72 | * Sends the password reset token to the user. |
||
73 | * |
||
74 | * @param UserPasswordReset $user |
||
75 | * |
||
76 | * @return int |
||
77 | */ |
||
78 | private function sendPasswordResetToken(UserPasswordReset $user) |
||
90 | |||
91 | /** |
||
92 | * Creates the password reset message. |
||
93 | * |
||
94 | * @param UserPasswordReset $user |
||
95 | * |
||
96 | * @return string |
||
97 | */ |
||
98 | private function getPasswordResetMessage(UserPasswordReset $user) |
||
105 | } |
||
106 |
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: