From 5e87f2df072ec4a243b6a3a983a753e8ffa5e6bf Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 13 Mar 2019 09:07:59 -0500 Subject: [PATCH] formatting --- .../{LogoutOtherDevices.php => OtherDeviceLogout.php} | 2 +- src/Illuminate/Auth/SessionGuard.php | 8 ++++---- tests/Integration/Auth/AuthenticationTest.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename src/Illuminate/Auth/Events/{LogoutOtherDevices.php => OtherDeviceLogout.php} (96%) diff --git a/src/Illuminate/Auth/Events/LogoutOtherDevices.php b/src/Illuminate/Auth/Events/OtherDeviceLogout.php similarity index 96% rename from src/Illuminate/Auth/Events/LogoutOtherDevices.php rename to src/Illuminate/Auth/Events/OtherDeviceLogout.php index 580e4ee91b3a..ea139a7b496e 100644 --- a/src/Illuminate/Auth/Events/LogoutOtherDevices.php +++ b/src/Illuminate/Auth/Events/OtherDeviceLogout.php @@ -4,7 +4,7 @@ use Illuminate\Queue\SerializesModels; -class LogoutOtherDevices +class OtherDeviceLogout { use SerializesModels; diff --git a/src/Illuminate/Auth/SessionGuard.php b/src/Illuminate/Auth/SessionGuard.php index 0b4ea8b259b9..9b6fe1cf8d51 100644 --- a/src/Illuminate/Auth/SessionGuard.php +++ b/src/Illuminate/Auth/SessionGuard.php @@ -552,7 +552,7 @@ public function logoutOtherDevices($password, $attribute = 'password') $this->queueRecallerCookie($this->user()); - $this->fireLogoutOtherDevicesEvent($this->user()); + $this->fireOtherDeviceLogoutEvent($this->user()); return $result; } @@ -618,15 +618,15 @@ protected function fireAuthenticatedEvent($user) } /** - * Fire the logout other devices event if the dispatcher is set. + * Fire the other device logout event if the dispatcher is set. * * @param \Illuminate\Contracts\Auth\Authenticatable $user * @return void */ - protected function fireLogoutOtherDevicesEvent($user) + protected function fireOtherDeviceLogoutEvent($user) { if (isset($this->events)) { - $this->events->dispatch(new Events\LogoutOtherDevices( + $this->events->dispatch(new Events\OtherDeviceLogout( $this->name, $user )); } diff --git a/tests/Integration/Auth/AuthenticationTest.php b/tests/Integration/Auth/AuthenticationTest.php index d61b8c97955c..022da68ed1fa 100644 --- a/tests/Integration/Auth/AuthenticationTest.php +++ b/tests/Integration/Auth/AuthenticationTest.php @@ -13,7 +13,7 @@ use Illuminate\Auth\EloquentUserProvider; use Illuminate\Auth\Events\Authenticated; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Auth\Events\LogoutOtherDevices; +use Illuminate\Auth\Events\OtherDeviceLogout; use Illuminate\Tests\Integration\Auth\Fixtures\AuthenticationTestUser; /** @@ -199,7 +199,7 @@ public function test_logging_out_other_devices() $this->app['auth']->logoutOtherDevices('adifferentpassword'); $this->assertEquals(1, $user->id); - Event::assertDispatched(LogoutOtherDevices::class, function ($event) { + Event::assertDispatched(OtherDeviceLogout::class, function ($event) { $this->assertEquals('web', $event->guard); $this->assertEquals(1, $event->user->id);