Skip to content

Commit 8bb3219

Browse files
Fix: Fix PHPStan error by chaining Stringable methods for email+IP (#158)
* Fix: Fix PHPStan error by chaining Stringable methods for email+IP * Fix: Remove unnecessary import
1 parent 8058f73 commit 8bb3219

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/Http/Requests/Auth/LoginRequest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Illuminate\Foundation\Http\FormRequest;
77
use Illuminate\Support\Facades\Auth;
88
use Illuminate\Support\Facades\RateLimiter;
9-
use Illuminate\Support\Str;
109
use Illuminate\Validation\ValidationException;
1110

1211
class LoginRequest extends FormRequest
@@ -80,6 +79,10 @@ public function ensureIsNotRateLimited(): void
8079
*/
8180
public function throttleKey(): string
8281
{
83-
return Str::transliterate(Str::lower($this->string('email')).'|'.$this->ip());
82+
return $this->string('email')
83+
->lower()
84+
->append('|'.$this->ip())
85+
->transliterate()
86+
->value();
8487
}
8588
}

0 commit comments

Comments
 (0)