From b40fedbea339defd5ff2a0d0a1ba0c191ba98af0 Mon Sep 17 00:00:00 2001 From: hafijul233 Date: Sun, 1 Oct 2023 06:46:15 +0000 Subject: [PATCH] Fix styling --- src/Http/Controllers/AuthenticatedSessionController.php | 8 ++++---- src/Models/User.php | 2 +- src/Services/UserService.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Http/Controllers/AuthenticatedSessionController.php b/src/Http/Controllers/AuthenticatedSessionController.php index 7f28604..3d53d3e 100644 --- a/src/Http/Controllers/AuthenticatedSessionController.php +++ b/src/Http/Controllers/AuthenticatedSessionController.php @@ -40,13 +40,13 @@ public function store(LoginRequest $request): LoginResource|JsonResponse if ($attemptUser->wrong_password > config('fintech.auth.threshold.password', 10)) { \Fintech\Auth\Facades\Auth::user()->update($attemptUser->id, [ - 'status' => UserStatus::InActive->value + 'status' => UserStatus::InActive->value, ]); return $this->failed(__('auth::messages.lockup')); } - if (!Hash::check($request->input('password'), $attemptUser->password)) { + if (! Hash::check($request->input('password'), $attemptUser->password)) { $request->hitRateLimited(); $wrongPasswordCount = $attemptUser->wrong_password + 1; @@ -56,7 +56,7 @@ public function store(LoginRequest $request): LoginResource|JsonResponse return $this->failed(__('auth::messages.warning', [ 'attempt' => $wrongPasswordCount, - 'threshold' => config('fintech.auth.threshold.password', 10) + 'threshold' => config('fintech.auth.threshold.password', 10), ])); } @@ -64,7 +64,7 @@ public function store(LoginRequest $request): LoginResource|JsonResponse Auth::login($attemptUser); - Auth::user()->tokens->each(fn($token) => $token->delete()); + Auth::user()->tokens->each(fn ($token) => $token->delete()); //permission check diff --git a/src/Models/User.php b/src/Models/User.php index 7b4764c..a439e9b 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -30,7 +30,7 @@ class User extends Authenticatable implements Auditable protected $casts = [ 'email_verified_at' => 'datetime', 'mobile_verified_at' => 'datetime', - 'wrong_password' => 'integer' + 'wrong_password' => 'integer', ]; protected $attributes = [ diff --git a/src/Services/UserService.php b/src/Services/UserService.php index a76604b..83c75d2 100644 --- a/src/Services/UserService.php +++ b/src/Services/UserService.php @@ -125,10 +125,10 @@ public function read($id) public function update($id, array $inputs = []) { - if (isset($inputs['password']) && !empty($inputs['password'])) { + if (isset($inputs['password']) && ! empty($inputs['password'])) { $inputs['password'] = Hash::make($inputs['password']); } - if (isset($inputs['pin']) && !empty($inputs['pin'])) { + if (isset($inputs['pin']) && ! empty($inputs['pin'])) { $inputs['pin'] = Hash::make($inputs['pin']); }