Passed
Pull Request — master (#49)
by
unknown
12:02 queued 08:22
created
src/Listeners/LogSuccessfulLogout.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@
 block discarded – undo
37 37
     {
38 38
         if ($event->user) {
39 39
             $user = $event->user;
40
-            if(method_exists($user, 'authentications')){
40
+            if (method_exists($user, 'authentications')) {
41 41
                 $ip = $this->request->ip();
42 42
                 $userAgent = $this->request->userAgent();
43 43
                 $authenticationLog = $user->authentications()->whereIpAddress($ip)->whereUserAgent($userAgent)->first();
44 44
     
45
-                if (! $authenticationLog) {
45
+                if (!$authenticationLog) {
46 46
                     $authenticationLog = new AuthenticationLog([
47 47
                         'ip_address' => $ip,
48 48
                         'user_agent' => $userAgent,
Please login to merge, or discard this patch.
src/Listeners/LogSuccessfulLogin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function handle(Login $event)
38 38
     {
39 39
         $user = $event->user;
40
-        if(method_exists($user, 'authentications')){
40
+        if (method_exists($user, 'authentications')) {
41 41
             $ip = $this->request->ip();
42 42
             $userAgent = $this->request->userAgent();
43 43
             $known = $user->authentications()->whereIpAddress($ip)->whereUserAgent($userAgent)->first();
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     
52 52
             $user->authentications()->save($authenticationLog);
53 53
     
54
-            if (! $known && ! $newUser && config('authentication-log.notify')) {
54
+            if (!$known && !$newUser && config('authentication-log.notify')) {
55 55
                 $user->notify(new NewDevice($authenticationLog));
56 56
             }
57 57
         }
Please login to merge, or discard this patch.
src/Listeners/LogSuccessfulOtherDeviceLogout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         if ($event->user) {
39 39
             $user = $event->user;
40
-            if(method_exists($user, 'authentications')){
40
+            if (method_exists($user, 'authentications')) {
41 41
                 $authenticationLog = $user->authentications()->whereNull('logout_at')->get()->skip(1);
42 42
     
43 43
                 $user->authentications()->whereIn('id', $authenticationLog->pluck('id'))->update([
Please login to merge, or discard this patch.