Passed
Push — npm/audit-fix ( 9e66ec )
by Yonathan
29:50 queued 14:40
created
app/Listeners/LogSuccessfulLogin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      *
15 15
      * @return void
16 16
      */
17
-    public function __construct()
17
+    public function __construct ()
18 18
     {
19 19
         //
20 20
     }
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
      * @param  Login  $event
27 27
      * @return void
28 28
      */
29
-    public function handle(Login $event)
29
+    public function handle (Login $event)
30 30
     {
31 31
         $user = $event->user;
32
-        Log::notice("Login by user {id=".$user->id.", email=".$user->email.", role=".$user->user_role->name."}");
32
+        Log::notice ("Login by user {id=".$user->id.", email=".$user->email.", role=".$user->user_role->name."}");
33 33
     }
34 34
 }
Please login to merge, or discard this patch.
app/Listeners/LogUserUpdated.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      *
15 15
      * @return void
16 16
      */
17
-    public function __construct()
17
+    public function __construct ()
18 18
     {
19 19
         //
20 20
     }
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
      * @param  UserUpdated  $event
26 26
      * @return void
27 27
      */
28
-    public function handle(UserUpdated $event)
28
+    public function handle (UserUpdated $event)
29 29
     {
30
-        Log::notice("User updated: ".$event->user);
30
+        Log::notice ("User updated: ".$event->user);
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
app/Listeners/CheckUserRole.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      *
13 13
      * @return void
14 14
      */
15
-    public function __construct()
15
+    public function __construct ()
16 16
     {
17 17
     }
18 18
 
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
      * @param UserUpdated $event Fires after successful database update.
23 23
      * @return void
24 24
      */
25
-    public function handle(UserUpdated $event) : void
25
+    public function handle (UserUpdated $event) : void
26 26
     {
27
-        if ($event->user->isManager() ||
28
-            $event->user->isAdmin()
27
+        if ($event->user->isManager () ||
28
+            $event->user->isAdmin ()
29 29
         ) {
30
-            $managerProfile = Manager::where('user_id', $event->user->id)->first();
30
+            $managerProfile = Manager::where ('user_id', $event->user->id)->first ();
31 31
             if ($managerProfile === null) {
32
-                $managerProfile = new Manager();
32
+                $managerProfile = new Manager ();
33 33
                 $managerProfile->user_id = $event->user->id;
34
-                $managerProfile->save();
34
+                $managerProfile->save ();
35 35
             }
36 36
         }
37 37
     }
Please login to merge, or discard this patch.
app/Listeners/ApplicationStatusChanged.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      *
16 16
      * @return void
17 17
      */
18
-    public function __construct()
18
+    public function __construct ()
19 19
     {
20 20
         //
21 21
     }
@@ -26,30 +26,30 @@  discard block
 block discarded – undo
26 26
      * @param  ApplicationSaved  $event
27 27
      * @return void
28 28
      */
29
-    public function handle(ApplicationSaved $event)
29
+    public function handle (ApplicationSaved $event)
30 30
     {
31 31
         $application = $event->application;
32 32
 
33
-        if (Auth::check()) {
34
-            $user = Auth::user();
33
+        if (Auth::check ()) {
34
+            $user = Auth::user ();
35 35
             $userText = "{id=".$user->id.", email=".$user->email."}";
36 36
         } else {
37 37
             $userText = "{null}";
38 38
         }
39 39
 
40 40
         //Log when application is first created
41
-        if($application->wasRecentlyCreated) {
41
+        if ($application->wasRecentlyCreated) {
42 42
             $applicationText = "{id=".$application->id.", status=".$application->application_status->name."}";
43 43
 
44
-            Log::notice("Application created: application ".$applicationText." has been created by user ".$userText);
44
+            Log::notice ("Application created: application ".$applicationText." has been created by user ".$userText);
45 45
         }
46 46
         //Log if application status has been changed
47
-        else if ($application->application_status_id != $application->getOriginal('application_status_id')) {
48
-            $freshApplication = $application->fresh();
47
+        else if ($application->application_status_id != $application->getOriginal ('application_status_id')) {
48
+            $freshApplication = $application->fresh ();
49 49
             $applicationText = "{id=".$freshApplication->id."}";
50 50
             $statusText = "{".$freshApplication->application_status->name."}";
51 51
 
52
-            Log::notice("Application status changed: application ".$applicationText." has been changed to ".$statusText." by user ".$userText);
52
+            Log::notice ("Application status changed: application ".$applicationText." has been changed to ".$statusText." by user ".$userText);
53 53
         }
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
app/Listeners/LogUserCreated.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      *
15 15
      * @return void
16 16
      */
17
-    public function __construct()
17
+    public function __construct ()
18 18
     {
19 19
         //
20 20
     }
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
      * @param  UserCreated  $event
26 26
      * @return void
27 27
      */
28
-    public function handle(UserCreated $event)
28
+    public function handle (UserCreated $event)
29 29
     {
30
-        Log::notice("User created: ".$event->user);
30
+        Log::notice ("User created: ".$event->user);
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
app/Listeners/LogApplicationRetrieved.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      *
16 16
      * @return void
17 17
      */
18
-    public function __construct()
18
+    public function __construct ()
19 19
     {
20 20
         //
21 21
     }
@@ -26,22 +26,22 @@  discard block
 block discarded – undo
26 26
      * @param  AppliationRetrieved  $event
27 27
      * @return void
28 28
      */
29
-    public function handle(ApplicationRetrieved $event)
29
+    public function handle (ApplicationRetrieved $event)
30 30
     {
31 31
         $application = $event->application;
32 32
 
33
-        if (Auth::check()) {
34
-            $user = Auth::user();
33
+        if (Auth::check ()) {
34
+            $user = Auth::user ();
35 35
 
36 36
             //Don't bother logging when an applicant views their own application
37 37
             if ($application->applicant->user->id != $user->id) {
38 38
                 $applicationText = "{id=$application->id}";
39 39
                 $userText = "{id=$user->id, email=$user->email}";
40
-                Log::notice("Application viewed: application $applicationText viewed by user $userText.");
40
+                Log::notice ("Application viewed: application $applicationText viewed by user $userText.");
41 41
             }
42 42
         } else {
43 43
             $applicationText = "{id=$application->id}";
44
-            Log::notice("Application retrieved: application $applicationText retrieved with no user logged in.");
44
+            Log::notice ("Application retrieved: application $applicationText retrieved with no user logged in.");
45 45
         }
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
app/Services/WhichPortal.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -8,36 +8,36 @@
 block discarded – undo
8 8
 class WhichPortal
9 9
 {
10 10
 
11
-    public function isApplicantPortal()
11
+    public function isApplicantPortal ()
12 12
     {
13
-        return !$this->isManagerPortal() && !$this->isAdminPortal();
13
+        return !$this->isManagerPortal () && !$this->isAdminPortal ();
14 14
     }
15 15
 
16
-    public function isManagerPortal()
16
+    public function isManagerPortal ()
17 17
     {
18
-        $url = URL::current();
19
-        return $this->urlIsManagerPortal($url);
18
+        $url = URL::current ();
19
+        return $this->urlIsManagerPortal ($url);
20 20
     }
21 21
 
22
-    public function isAdminPortal()
22
+    public function isAdminPortal ()
23 23
     {
24
-        $url = URL::current();
25
-        return $this->urlIsAdminPortal($url);
24
+        $url = URL::current ();
25
+        return $this->urlIsAdminPortal ($url);
26 26
     }
27 27
 
28
-    public function urlIsManagerPortal($url): bool
28
+    public function urlIsManagerPortal ($url): bool
29 29
     {
30
-        $baseUrl = config('app.url');
31
-        $managerPrefix = config('app.manager_prefix');
30
+        $baseUrl = config ('app.url');
31
+        $managerPrefix = config ('app.manager_prefix');
32 32
         $managerPattern = "#^$baseUrl/(\w+/)?$managerPrefix(/.*)?$#";
33
-        return preg_match($managerPattern, $url);
33
+        return preg_match ($managerPattern, $url);
34 34
     }
35 35
 
36
-    public function urlIsAdminPortal($url): bool
36
+    public function urlIsAdminPortal ($url): bool
37 37
     {
38
-        $baseUrl = config('app.url');
39
-        $adminPrefix = config('backpack.base.route_prefix', 'admin');
38
+        $baseUrl = config ('app.url');
39
+        $adminPrefix = config ('backpack.base.route_prefix', 'admin');
40 40
         $adminPattern = "#^$baseUrl/(\w+/)?$adminPrefix(/.*)?$#";
41
-        return preg_match($adminPattern, $url);
41
+        return preg_match ($adminPattern, $url);
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/ValidIdRule.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      *
20 20
      * @param string $className
21 21
      */
22
-    public function __construct(string $className)
22
+    public function __construct (string $className)
23 23
     {
24 24
         $this->className = $className;
25 25
     }
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
      * @param  mixed  $value
32 32
      * @return bool
33 33
      */
34
-    public function passes($attribute, $value)
34
+    public function passes ($attribute, $value)
35 35
     {
36 36
         $model = $this->className;
37
-        return $model::where('id', $value)->exists();
37
+        return $model::where ('id', $value)->exists ();
38 38
     }
39 39
 
40 40
     /**
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
      *
43 43
      * @return string
44 44
      */
45
-    public function message()
45
+    public function message ()
46 46
     {
47
-        return Lang::get('validation.invalid_id');
47
+        return Lang::get ('validation.invalid_id');
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/PasswordCorrectRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@
 block discarded – undo
9 9
 
10 10
 class PasswordCorrectRule implements Rule
11 11
 {
12
-    public function passes($attribute, $value)
12
+    public function passes ($attribute, $value)
13 13
     {
14
-        return Hash::check($value, Auth::user()->getAuthPassword());
14
+        return Hash::check ($value, Auth::user ()->getAuthPassword ());
15 15
     }
16 16
 
17
-    public function message()
17
+    public function message ()
18 18
     {
19
-        return Lang::get('validation.password_correct');
19
+        return Lang::get ('validation.password_correct');
20 20
     }
21 21
 }
Please login to merge, or discard this patch.