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:
Yury Pikhtarev 2025-06-24 02:00:20 +04:00
commit 2113395b53
No known key found for this signature in database
4 changed files with 14 additions and 4 deletions

View file

@ -25,7 +25,7 @@ class ConfirmablePasswordController extends Controller
*/ */
public function store(Request $request): RedirectResponse public function store(Request $request): RedirectResponse
{ {
if (! Auth::guard('web')->validate([ if (!Auth::guard('web')->validate([
'email' => $request->user()->email, 'email' => $request->user()->email,
'password' => $request->password, 'password' => $request->password,
])) { ])) {

View file

@ -50,7 +50,7 @@ class HandleInertiaRequests extends Middleware
...(new Ziggy)->toArray(), ...(new Ziggy)->toArray(),
'location' => $request->url(), 'location' => $request->url(),
], ],
'sidebarOpen' => ! $request->hasCookie('sidebar_state') || $request->cookie('sidebar_state') === 'true', 'sidebarOpen' => !$request->hasCookie('sidebar_state') || $request->cookie('sidebar_state') === 'true',
]; ];
} }
} }

View file

@ -41,7 +41,7 @@ class LoginRequest extends FormRequest
{ {
$this->ensureIsNotRateLimited(); $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()); RateLimiter::hit($this->throttleKey());
throw ValidationException::withMessages([ throw ValidationException::withMessages([
@ -59,7 +59,7 @@ class LoginRequest extends FormRequest
*/ */
public function ensureIsNotRateLimited(): void public function ensureIsNotRateLimited(): void
{ {
if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) { if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
return; return;
} }

10
pint.json Normal file
View file

@ -0,0 +1,10 @@
{
"preset": "laravel",
"rules": {
"concat_space": false,
"not_operator_with_successor_space": false
},
"exclude": [
"legacy"
]
}