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 | public function __construct(UserRepositoryCollection $userRepositoryCollection, Swift_Mailer $mailer, TranslatorInterface $translator, RouterInterface $router) |
||
41 | |||
42 | /** |
||
43 | * Creates a password reset token and sends an email to the user. |
||
44 | * |
||
45 | * @param PasswordResetRequest $command |
||
46 | * |
||
47 | * @return int |
||
48 | */ |
||
49 | public function handle(PasswordResetRequest $command) |
||
58 | |||
59 | /** |
||
60 | * Sends the password reset token to the user. |
||
61 | * |
||
62 | * @param UserPasswordReset $user |
||
63 | * |
||
64 | * @return int |
||
65 | */ |
||
66 | private function sendPasswordResetToken(UserPasswordReset $user) |
||
78 | |||
79 | /** |
||
80 | * Creates the password reset message. |
||
81 | * |
||
82 | * @param UserPasswordReset $user |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | private function getPasswordResetMessage(UserPasswordReset $user) |
||
93 | } |
||
94 |
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: