1 | <?php namespace Anomaly\UsersModule\User\Password\Command; |
||
14 | class ResetPassword |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * The user instance. |
||
19 | * |
||
20 | * @var UserInterface |
||
21 | */ |
||
22 | protected $user; |
||
23 | |||
24 | /** |
||
25 | * The password reset code. |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $code; |
||
30 | |||
31 | /** |
||
32 | * The password desired. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $password; |
||
37 | |||
38 | /** |
||
39 | * Create a new ResetPasswordReset instance. |
||
40 | * |
||
41 | * @param UserInterface $user |
||
42 | * @param $code |
||
43 | * @param $password |
||
44 | */ |
||
45 | function __construct(UserInterface $user, $code, $password) |
||
51 | |||
52 | /** |
||
53 | * Handle the command. |
||
54 | * |
||
55 | * @param UserRepositoryInterface $users |
||
56 | * @return bool |
||
57 | */ |
||
58 | public function handle(UserRepositoryInterface $users) |
||
77 | } |
||
78 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.