Passed
Push — feature/immutable-application-... ( 724692...212613 )
by Chris
34:25 queued 17:29
created
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/SkillDeclarationValidator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 class SkillDeclarationValidator
16 16
 {
17 17
 
18
-    public function validator(SkillDeclaration $skillDeclaration)
18
+    public function validator (SkillDeclaration $skillDeclaration)
19 19
     {
20
-        $uniqueSkillRule = new UniqueSkillDeclarationRule($skillDeclaration->skillable->skill_declarations, $skillDeclaration->id);
20
+        $uniqueSkillRule = new UniqueSkillDeclarationRule ($skillDeclaration->skillable->skill_declarations, $skillDeclaration->id);
21 21
 
22 22
         // Validate basic data is filled in
23
-        $validator = Validator::make($skillDeclaration->getAttributes(), [
23
+        $validator = Validator::make ($skillDeclaration->getAttributes (), [
24 24
             'skill_id' => [
25 25
                 'required',
26 26
                 'exists:skills,id',
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             ],
29 29
             'skillable_id' => [
30 30
                 'required',
31
-                new PolyExistsRule($skillDeclaration->skillable_type),
31
+                new PolyExistsRule ($skillDeclaration->skillable_type),
32 32
             ],
33 33
             'skillable_type' => 'required',
34 34
             'skill_status_id' => [
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
         return $validator;
45 45
     }
46 46
 
47
-    public function validate(SkillDeclaration $skillDeclaration)
47
+    public function validate (SkillDeclaration $skillDeclaration)
48 48
     {
49
-        return $this->validator($skillDeclaration)->validate();
49
+        return $this->validator ($skillDeclaration)->validate ();
50 50
     }
51 51
 }
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.
app/Services/Validation/Rules/TwitterHandleRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
      * @param  mixed   $value
27 27
      * @return boolean
28 28
      */
29
-    public function passes($attribute, $value)
29
+    public function passes ($attribute, $value)
30 30
     {
31
-        return preg_match('/' . self::PATTERN . '/', $value);
31
+        return preg_match ('/'.self::PATTERN.'/', $value);
32 32
     }
33 33
 
34 34
     /**
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
      *
37 37
      * @return string
38 38
      */
39
-    public function message()
39
+    public function message ()
40 40
     {
41
-        return Lang::get('validation.custom.twitter_handle');
41
+        return Lang::get ('validation.custom.twitter_handle');
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/PasswordFormatRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
      * https://laraveldaily.com/how-to-create-custom-validation-rules-laravel/
20 20
      */
21 21
 
22
-    public function passes($attribute, $value) {
22
+    public function passes ($attribute, $value) {
23 23
         $passwordPattern = "~^.*(?=.{3,})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[.!@#$%^&*]).*$~";
24
-        return preg_match($passwordPattern, $value);
24
+        return preg_match ($passwordPattern, $value);
25 25
     }
26 26
 
27
-    public function message() {
28
-        return Lang::get('validation.custom.password');
27
+    public function message () {
28
+        return Lang::get ('validation.custom.password');
29 29
     }
30 30
 
31 31
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/UniqueSkillDeclarationRule.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      * @param  App\Models\Applicant  $user
20 20
      * @return void
21 21
      */
22
-    public function __construct($existing_declarations, $skill_declaration_id = null)
22
+    public function __construct ($existing_declarations, $skill_declaration_id = null)
23 23
     {
24 24
         $this->existing_declarations = $existing_declarations;
25 25
         $this->skill_declaration_id = $skill_declaration_id;
@@ -32,17 +32,17 @@  discard block
 block discarded – undo
32 32
      * @param  [type] $value     [description]
33 33
      * @return [type]            [description]
34 34
      */
35
-    public function passes($attribute, $value)
35
+    public function passes ($attribute, $value)
36 36
     {
37
-        $prev_declarations_of_skill = $this->existing_declarations->where('skill_id', $value);
37
+        $prev_declarations_of_skill = $this->existing_declarations->where ('skill_id', $value);
38 38
 
39
-        return $prev_declarations_of_skill->isEmpty() ||
39
+        return $prev_declarations_of_skill->isEmpty () ||
40 40
             ($this->skill_declaration_id != null
41
-                && $prev_declarations_of_skill->pluck('id')->contains($this->skill_declaration_id));
41
+                && $prev_declarations_of_skill->pluck ('id')->contains ($this->skill_declaration_id));
42 42
     }
43 43
 
44
-    public function message()
44
+    public function message ()
45 45
     {
46
-        return Lang::get('validation.user_skill_unique');
46
+        return Lang::get ('validation.user_skill_unique');
47 47
     }
48 48
 }
Please login to merge, or discard this patch.