lint fix
This commit is contained in:
parent
ad73cbade1
commit
502bc49042
|
@ -24,10 +24,12 @@ 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,
|
||||
])) {
|
||||
])
|
||||
) {
|
||||
throw ValidationException::withMessages([
|
||||
'password' => __('auth.password'),
|
||||
]);
|
||||
|
|
|
@ -17,7 +17,13 @@ class ProfileUpdateRequest extends FormRequest
|
|||
{
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)],
|
||||
'email' => [
|
||||
'required',
|
||||
'string',
|
||||
'lowercase',
|
||||
'email',
|
||||
'max:255',
|
||||
Rule::unique(User::class)->ignore($this->user()->id)],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
|
|
@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
|
|
@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
|
|
@ -10,14 +10,14 @@ class AuthenticationTest extends TestCase
|
|||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_login_screen_can_be_rendered(): void
|
||||
public function testLoginScreenCanBeRendered(): void
|
||||
{
|
||||
$response = $this->get('/login');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_users_can_authenticate_using_the_login_screen(): void
|
||||
public function testUsersCanAuthenticateUsingTheLoginScreen(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
@ -30,7 +30,7 @@ class AuthenticationTest extends TestCase
|
|||
$response->assertRedirect(route('dashboard', absolute: false));
|
||||
}
|
||||
|
||||
public function test_users_can_not_authenticate_with_invalid_password(): void
|
||||
public function testUsersCanNotAuthenticateWithInvalidPassword(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
@ -42,7 +42,7 @@ class AuthenticationTest extends TestCase
|
|||
$this->assertGuest();
|
||||
}
|
||||
|
||||
public function test_users_can_logout(): void
|
||||
public function testUsersCanLogout(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class EmailVerificationTest extends TestCase
|
|||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_email_verification_screen_can_be_rendered(): void
|
||||
public function testEmailVerificationScreenCanBeRendered(): void
|
||||
{
|
||||
$user = User::factory()->unverified()->create();
|
||||
|
||||
|
@ -22,7 +22,7 @@ class EmailVerificationTest extends TestCase
|
|||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_email_can_be_verified(): void
|
||||
public function testEmailCanBeVerified(): void
|
||||
{
|
||||
$user = User::factory()->unverified()->create();
|
||||
|
||||
|
@ -41,7 +41,7 @@ class EmailVerificationTest extends TestCase
|
|||
$response->assertRedirect(route('dashboard', absolute: false) . '?verified=1');
|
||||
}
|
||||
|
||||
public function test_email_is_not_verified_with_invalid_hash(): void
|
||||
public function testEmailIsNotVerifiedWithInvalidHash(): void
|
||||
{
|
||||
$user = User::factory()->unverified()->create();
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ class PasswordConfirmationTest extends TestCase
|
|||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_confirm_password_screen_can_be_rendered(): void
|
||||
public function testConfirmPasswordScreenCanBeRendered(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
@ -19,7 +19,7 @@ class PasswordConfirmationTest extends TestCase
|
|||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_password_can_be_confirmed(): void
|
||||
public function testPasswordCanBeConfirmed(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
@ -31,7 +31,7 @@ class PasswordConfirmationTest extends TestCase
|
|||
$response->assertSessionHasNoErrors();
|
||||
}
|
||||
|
||||
public function test_password_is_not_confirmed_with_invalid_password(): void
|
||||
public function testPasswordIsNotConfirmedWithInvalidPassword(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
|
|
@ -12,14 +12,14 @@ class PasswordResetTest extends TestCase
|
|||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_reset_password_link_screen_can_be_rendered(): void
|
||||
public function testResetPasswordLinkScreenCanBeRendered(): void
|
||||
{
|
||||
$response = $this->get('/forgot-password');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_reset_password_link_can_be_requested(): void
|
||||
public function testResetPasswordLinkCanBeRequested(): void
|
||||
{
|
||||
Notification::fake();
|
||||
|
||||
|
@ -30,7 +30,7 @@ class PasswordResetTest extends TestCase
|
|||
Notification::assertSentTo($user, ResetPassword::class);
|
||||
}
|
||||
|
||||
public function test_reset_password_screen_can_be_rendered(): void
|
||||
public function testResetPasswordScreenCanBeRendered(): void
|
||||
{
|
||||
Notification::fake();
|
||||
|
||||
|
@ -47,7 +47,7 @@ class PasswordResetTest extends TestCase
|
|||
});
|
||||
}
|
||||
|
||||
public function test_password_can_be_reset_with_valid_token(): void
|
||||
public function testPasswordCanBeResetWithValidToken(): void
|
||||
{
|
||||
Notification::fake();
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class PasswordUpdateTest extends TestCase
|
|||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_password_can_be_updated(): void
|
||||
public function testPasswordCanBeUpdated(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
@ -31,7 +31,7 @@ class PasswordUpdateTest extends TestCase
|
|||
$this->assertTrue(Hash::check('new-password', $user->refresh()->password));
|
||||
}
|
||||
|
||||
public function test_correct_password_must_be_provided_to_update_password(): void
|
||||
public function testCorrectPasswordMustBeProvidedToUpdatePassword(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
|
|
@ -9,14 +9,14 @@ class RegistrationTest extends TestCase
|
|||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_registration_screen_can_be_rendered(): void
|
||||
public function testRegistrationScreenCanBeRendered(): void
|
||||
{
|
||||
$response = $this->get('/register');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_new_users_can_register(): void
|
||||
public function testNewUsersCanRegister(): void
|
||||
{
|
||||
$response = $this->post('/register', [
|
||||
'name' => 'Test User',
|
||||
|
|
|
@ -10,7 +10,7 @@ class ProfileTest extends TestCase
|
|||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_profile_page_is_displayed(): void
|
||||
public function testProfilePageIsDisplayed(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
@ -21,7 +21,7 @@ class ProfileTest extends TestCase
|
|||
$response->assertOk();
|
||||
}
|
||||
|
||||
public function test_profile_information_can_be_updated(): void
|
||||
public function testProfileInformationCanBeUpdated(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
@ -43,7 +43,7 @@ class ProfileTest extends TestCase
|
|||
$this->assertNull($user->email_verified_at);
|
||||
}
|
||||
|
||||
public function test_email_verification_status_is_unchanged_when_the_email_address_is_unchanged(): void
|
||||
public function testEmailVerificationStatusIsUnchangedWhenTheEmailAddressIsUnchanged(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
@ -61,7 +61,7 @@ class ProfileTest extends TestCase
|
|||
$this->assertNotNull($user->refresh()->email_verified_at);
|
||||
}
|
||||
|
||||
public function test_user_can_delete_their_account(): void
|
||||
public function testUserCanDeleteTheirAccount(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
@ -79,7 +79,7 @@ class ProfileTest extends TestCase
|
|||
$this->assertNull($user->fresh());
|
||||
}
|
||||
|
||||
public function test_correct_password_must_be_provided_to_delete_account(): void
|
||||
public function testCorrectPasswordMustBeProvidedToDeleteAccount(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
|
Loading…
Reference in New Issue