mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
chore: add Pint configuration and refactor code style
- Introduced a new Pint configuration file for code style enforcement with specific rules and exclusions. - Refactored code in various files to adhere to the new style guidelines, including adjustments to spacing in conditional statements. These changes enhance code consistency and maintainability across the project.
This commit is contained in:
parent
fffb5a7169
commit
2113395b53
4 changed files with 14 additions and 4 deletions
|
@ -25,7 +25,7 @@ class ConfirmablePasswordController extends Controller
|
|||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
if (! Auth::guard('web')->validate([
|
||||
if (!Auth::guard('web')->validate([
|
||||
'email' => $request->user()->email,
|
||||
'password' => $request->password,
|
||||
])) {
|
||||
|
|
|
@ -50,7 +50,7 @@ class HandleInertiaRequests extends Middleware
|
|||
...(new Ziggy)->toArray(),
|
||||
'location' => $request->url(),
|
||||
],
|
||||
'sidebarOpen' => ! $request->hasCookie('sidebar_state') || $request->cookie('sidebar_state') === 'true',
|
||||
'sidebarOpen' => !$request->hasCookie('sidebar_state') || $request->cookie('sidebar_state') === 'true',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ class LoginRequest extends FormRequest
|
|||
{
|
||||
$this->ensureIsNotRateLimited();
|
||||
|
||||
if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {
|
||||
if (!Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {
|
||||
RateLimiter::hit($this->throttleKey());
|
||||
|
||||
throw ValidationException::withMessages([
|
||||
|
@ -59,7 +59,7 @@ class LoginRequest extends FormRequest
|
|||
*/
|
||||
public function ensureIsNotRateLimited(): void
|
||||
{
|
||||
if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
|
||||
if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
10
pint.json
Normal file
10
pint.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"preset": "laravel",
|
||||
"rules": {
|
||||
"concat_space": false,
|
||||
"not_operator_with_successor_space": false
|
||||
},
|
||||
"exclude": [
|
||||
"legacy"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue