refactor: auto refactor via rector

This commit is contained in:
idevakk
2025-09-29 01:08:34 +05:30
parent 744e0bb9bb
commit 21664b1a3e
26 changed files with 55 additions and 68 deletions

View File

@@ -10,7 +10,7 @@ class Logout
/**
* Log the current user out of the application.
*/
public function __invoke()
public function __invoke(): \Illuminate\Routing\Redirector|\Illuminate\Http\RedirectResponse
{
Auth::guard('web')->logout();

View File

@@ -50,7 +50,7 @@ class ResetPassword extends Component
// database. Otherwise we will parse the error and return the response.
$status = Password::reset(
$this->only('email', 'password', 'password_confirmation', 'token'),
function ($user) {
function ($user): void {
$user->forceFill([
'password' => Hash::make($this->password),
'remember_token' => Str::random(60),

View File

@@ -39,7 +39,7 @@ class RecoveryCodes extends Component
if ($user->hasEnabledTwoFactorAuthentication() && $user->two_factor_recovery_codes) {
try {
$this->recoveryCodes = json_decode(decrypt($user->two_factor_recovery_codes), true);
$this->recoveryCodes = json_decode((string) decrypt($user->two_factor_recovery_codes), true);
} catch (Exception) {
$this->addError('recoveryCodes', 'Failed to load recovery codes');