| Total Complexity | 1 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class ResetUserPassword implements ResetsUserPasswords |
||
| 11 | { |
||
| 12 | use PasswordValidationRules; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Validate and reset the user's forgotten password. |
||
| 16 | * |
||
| 17 | * @param array<string, string> $input |
||
| 18 | */ |
||
| 19 | public function reset(User $user, array $input): void |
||
| 20 | { |
||
| 21 | Validator::make($input, [ |
||
| 22 | 'password' => $this->passwordRules(), |
||
| 23 | ])->validate(); |
||
| 24 | |||
| 25 | $user->forceFill([ |
||
| 26 | 'password' => Hash::make($input['password']), |
||
| 27 | ])->save(); |
||
| 28 | } |
||
| 30 |