Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Mar 29, 2024
1 parent ab99faf commit 7fe0e2c
Show file tree
Hide file tree
Showing 29 changed files with 208 additions and 211 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function create(): Response
{
return Inertia::render('Auth/Login', [
'canResetPassword' => Route::has('password.request'),
'status' => session('status'),
'status' => session('status'),
]);
}

Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Auth/ConfirmablePasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public function show(): Response
*/
public function store(Request $request): RedirectResponse
{
if (! Auth::guard('web')->validate([
'email' => $request->user()->email,
if (!Auth::guard('web')->validate([
'email' => $request->user()->email,
'password' => $request->password,
])) {
throw ValidationException::withMessages([
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/Auth/NewPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public function create(Request $request): Response
public function store(Request $request): RedirectResponse
{
$request->validate([
'token' => 'required',
'email' => 'required|email',
'token' => 'required',
'email' => 'required|email',
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);

Expand All @@ -47,7 +47,7 @@ public function store(Request $request): RedirectResponse
$request->only('email', 'password', 'password_confirmation', 'token'),
function ($user) use ($request) {
$user->forceFill([
'password' => Hash::make($request->password),
'password' => Hash::make($request->password),
'remember_token' => Str::random(60),
])->save();

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/PasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function update(Request $request): RedirectResponse
{
$validated = $request->validate([
'current_password' => ['required', 'current_password'],
'password' => ['required', Password::defaults(), 'confirmed'],
'password' => ['required', Password::defaults(), 'confirmed'],
]);

$request->user()->update([
Expand Down
8 changes: 4 additions & 4 deletions app/Http/Controllers/Auth/RegisteredUserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ public function create(): Response
public function store(Request $request): RedirectResponse
{
$request->validate([
'name' => 'required|string|max:255',
'email' => 'required|string|lowercase|email|max:255|unique:'.User::class,
'name' => 'required|string|max:255',
'email' => 'required|string|lowercase|email|max:255|unique:'.User::class,
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);

$user = User::create([
'name' => $request->name,
'email' => $request->email,
'name' => $request->name,
'email' => $request->email,
'password' => Hash::make($request->password),
]);

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function edit(Request $request): Response
{
return Inertia::render('Profile/Edit', [
'mustVerifyEmail' => $request->user() instanceof MustVerifyEmail,
'status' => session('status'),
'status' => session('status'),
]);
}

Expand Down
6 changes: 3 additions & 3 deletions app/Http/Requests/Auth/LoginRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function authorize(): bool
public function rules(): array
{
return [
'email' => ['required', 'string', 'email'],
'email' => ['required', 'string', 'email'],
'password' => ['required', 'string'],
];
}
Expand All @@ -41,7 +41,7 @@ public function authenticate(): void
{
$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([
Expand All @@ -59,7 +59,7 @@ public function authenticate(): void
*/
public function ensureIsNotRateLimited(): void
{
if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/ProfileUpdateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ProfileUpdateRequest extends FormRequest
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)],
];
}
Expand Down
2 changes: 1 addition & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
'password' => 'hashed',
];
}
}
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],

];
10 changes: 5 additions & 5 deletions config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

'defaults' => [
'guard' => env('AUTH_GUARD', 'web'),
'guard' => env('AUTH_GUARD', 'web'),
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
],

Expand All @@ -37,7 +37,7 @@

'guards' => [
'web' => [
'driver' => 'session',
'driver' => 'session',
'provider' => 'users',
],
],
Expand All @@ -62,7 +62,7 @@
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', App\Models\User::class),
'model' => env('AUTH_MODEL', App\Models\User::class),
],

// 'users' => [
Expand Down Expand Up @@ -93,8 +93,8 @@
'passwords' => [
'users' => [
'provider' => 'users',
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
'expire' => 60,
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
'expire' => 60,
'throttle' => 60,
],
],
Expand Down
34 changes: 17 additions & 17 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,27 @@
'stores' => [

'array' => [
'driver' => 'array',
'driver' => 'array',
'serialize' => false,
],

'database' => [
'driver' => 'database',
'table' => env('DB_CACHE_TABLE', 'cache'),
'connection' => env('DB_CACHE_CONNECTION'),
'driver' => 'database',
'table' => env('DB_CACHE_TABLE', 'cache'),
'connection' => env('DB_CACHE_CONNECTION'),
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
],

'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],

'memcached' => [
'driver' => 'memcached',
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
Expand All @@ -63,25 +63,25 @@
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],

'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
'driver' => 'redis',
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
],

'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],

Expand Down
Loading

0 comments on commit 7fe0e2c

Please sign in to comment.