Passed
Push — task/comment-model ( 01686c...5f14b3 )
by Yonathan
40:21 queued 30:59
created
app/Services/Validation/Rules/ReferencesValidator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,25 +13,25 @@
 block discarded – undo
13 13
     public function __construct(Applicant $applicant)
14 14
     {
15 15
         $this->applicant = $applicant;
16
-        $this->relationship_id = Relationship::all()->pluck('id');
16
+        $this->relationship_id = Relationship::all ()->pluck ('id');
17 17
     }
18 18
     public function validate(ReferencesValidator $referencesValidator)
19 19
     {
20
-        $uniqueSkillRule = new UniqueApplicantSkillRule($this->applicant, $referencesValidator->id);
20
+        $uniqueSkillRule = new UniqueApplicantSkillRule ($this->applicant, $referencesValidator->id);
21 21
         //This array is reset every time because applicants table can change frequently
22
-        $applicant_ids = Applicant::all()->pluck('id');
22
+        $applicant_ids = Applicant::all ()->pluck ('id');
23 23
         //Validate basic data is filled in
24
-        Validator::make($referencesValidator->getAttributes(), [
24
+        Validator::make ($referencesValidator->getAttributes (), [
25 25
             'applicant_id' => [
26 26
                 'required',
27
-                Rule::in($applicant_ids->toArray()),      
27
+                Rule::in ($applicant_ids->toArray ()),      
28 28
         ],  
29 29
             'relatonship_id' => [
30 30
             'required',
31
-            Rule::in($this->relationship_id->toArray()),
31
+            Rule::in ($this->relationship_id->toArray ()),
32 32
         ]       
33 33
             
34
-        ])->validate();
34
+        ])->validate ();
35 35
     }
36 36
      
37 37
 }
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
app/Services/Validation/Rules/WorkExperienceValidator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@
 block discarded – undo
20 20
     }
21 21
     public function validate(WorkExperienceValidator $workExperienceValidator)
22 22
     {
23
-        $uniqueSkillRule = new UniqueApplicantSkillRule($this->applicant, $workExperienceValidator->id);
23
+        $uniqueSkillRule = new UniqueApplicantSkillRule ($this->applicant, $workExperienceValidator->id);
24 24
         //This array is reset every time because applicants table can change frequently
25
-        $applicant_ids = Applicant::all()->pluck('id');
25
+        $applicant_ids = Applicant::all ()->pluck ('id');
26 26
         //Validate basic data is filled in
27
-        Validator::make($workExperienceValidator->getAttributes(), [  
27
+        Validator::make ($workExperienceValidator->getAttributes (), [  
28 28
             'applicant_id' => [
29 29
                 'required',
30
-                Rule::in($applicant_ids->toArray()),
30
+                Rule::in ($applicant_ids->toArray ()),
31 31
         ]
32 32
          
33
-        ])->validate();
33
+        ])->validate ();
34 34
     }
35 35
     
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
app/Services/Validation/Rules/UniqueApplicantSkillRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@
 block discarded – undo
33 33
      */
34 34
     public function passes($attribute, $value)
35 35
     {
36
-        $prev_skills = $this->applicant->skill_declarations->where('skill_id', $value)->pluck('id');
36
+        $prev_skills = $this->applicant->skill_declarations->where ('skill_id', $value)->pluck ('id');
37 37
 
38
-        return $prev_skills->isEmpty() ||
39
-            ($this->skill_declaration_id != null && $prev_skills->contains($this->skill_declaration_id));
38
+        return $prev_skills->isEmpty () ||
39
+            ($this->skill_declaration_id != null && $prev_skills->contains ($this->skill_declaration_id));
40 40
     }
41 41
 
42 42
     public function message()
43 43
     {
44
-        return Lang::get('validation.user_skill_unique');
44
+        return Lang::get ('validation.user_skill_unique');
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/TwitterHandleRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 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
     /**
@@ -38,6 +38,6 @@  discard block
 block discarded – undo
38 38
      */
39 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/DegreeValidator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,26 +15,26 @@
 block discarded – undo
15 15
     public function __construct(Applicant $applicant)
16 16
     {
17 17
         $this->applicant = $applicant;
18
-        $this->degree_type_id = DegreeType::all()->pluck('id');
18
+        $this->degree_type_id = DegreeType::all ()->pluck ('id');
19 19
 
20 20
     }
21 21
     public function validate(DegreeValidator $degreeValidator)
22 22
     {
23
-        $uniqueSkillRule = new UniqueApplicantSkillRule($this->applicant, $degreeValidator->id);
23
+        $uniqueSkillRule = new UniqueApplicantSkillRule ($this->applicant, $degreeValidator->id);
24 24
         //This array is reset every time because applicants table can change frequently
25
-        $applicant_ids = Applicant::all()->pluck('id');
25
+        $applicant_ids = Applicant::all ()->pluck ('id');
26 26
         //Validate basic data is filled in
27
-        Validator::make($degreeValidator->getAttributes(), [
27
+        Validator::make ($degreeValidator->getAttributes (), [
28 28
             'applicant_id' => [
29 29
             'required',
30
-               Rule::in($applicant_ids->toArray()),
30
+               Rule::in ($applicant_ids->toArray ()),
31 31
         ],
32 32
             'degree_type_id' => [
33 33
             'required',
34
-               Rule::in($this->degree_type_id->toArray()),
34
+               Rule::in ($this->degree_type_id->toArray ()),
35 35
         ]
36 36
 
37
-        ])->validate();
37
+        ])->validate ();
38 38
     }
39 39
 
40 40
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/CourseValidator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,25 +15,25 @@
 block discarded – undo
15 15
     public function __construct(Applicant $applicant)
16 16
     {
17 17
         $this->applicant = $applicant;
18
-        $this->course_status_ids = CourseStatus::all()->pluck('id');
18
+        $this->course_status_ids = CourseStatus::all ()->pluck ('id');
19 19
     }
20 20
     public function validate(CourseValidator $courseValidator)
21 21
     {
22
-        $uniqueSkillRule = new UniqueApplicantSkillRule($this->applicant, $courseValidator->id);
22
+        $uniqueSkillRule = new UniqueApplicantSkillRule ($this->applicant, $courseValidator->id);
23 23
         //This array is reset every time because applicants table can change frequently
24
-        $applicant_ids = Applicant::all()->pluck('id');
24
+        $applicant_ids = Applicant::all ()->pluck ('id');
25 25
         //Validate basic data is filled in
26
-        Validator::make($courseValidator->getAttributes(), [ 
26
+        Validator::make ($courseValidator->getAttributes (), [ 
27 27
             'applicant_id' => [
28 28
              'required',
29
-                Rule::in($applicant_ids->toArray()),
29
+                Rule::in ($applicant_ids->toArray ()),
30 30
        ],
31 31
              'course_status_id' => [
32 32
              'required',
33
-                Rule::in($this->course_status_ids->toArray()),    
33
+                Rule::in ($this->course_status_ids->toArray ()),    
34 34
      ]
35 35
          
36
-        ])->validate();
36
+        ])->validate ();
37 37
     }
38 38
     
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
app/Services/Validation/JobPosterValidator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@
 block discarded – undo
17 17
      */
18 18
     public static function validateUnpublished(JobPoster $jobPoster)
19 19
     {
20
-        Validator::make(
21
-            $jobPoster->toArray(),
20
+        Validator::make (
21
+            $jobPoster->toArray (),
22 22
             [
23 23
                 'published' => [
24 24
                     'required',
25
-                    Rule::in([false])
25
+                    Rule::in ([false])
26 26
                 ]
27 27
             ]
28
-        )->validate();
28
+        )->validate ();
29 29
     }
30 30
 
31 31
 }
Please login to merge, or discard this patch.
app/Services/Validation/Requests/UpdateReferenceValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function __construct()
26 26
     {
27
-        $this->relationshipIds = Relationship::all()->pluck('id')->toArray();
27
+        $this->relationshipIds = Relationship::all ()->pluck ('id')->toArray ();
28 28
     }
29 29
     /**
30 30
      * Get the validation rules that apply to the request.
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             ],
44 44
             'relationship_id' => [
45 45
                 'required',
46
-                Rule::in($this->relationshipIds)
46
+                Rule::in ($this->relationshipIds)
47 47
             ],
48 48
             'description' => 'required|string',
49 49
 
@@ -68,6 +68,6 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function validator(array $data) : \Illuminate\Validation\Validator
70 70
     {
71
-        return Validator::make($data, $this->rules());
71
+        return Validator::make ($data, $this->rules ());
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
app/Services/Validation/Requests/UpdateWorkSampleValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function __construct()
26 26
     {
27
-        $this->fileTypeIds = FileType::all()->pluck('id')->toArray();
27
+        $this->fileTypeIds = FileType::all ()->pluck ('id')->toArray ();
28 28
     }
29 29
     /**
30 30
      * Get the validation rules that apply to the request.
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             'name' => 'required|string|max:191',
39 39
             'file_type_id' => [
40 40
                 'required',
41
-                Rule::in($this->fileTypeIds)
41
+                Rule::in ($this->fileTypeIds)
42 42
             ],
43 43
             'url' => 'required|url',
44 44
             'description' => 'required|string',
@@ -57,6 +57,6 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function validator(array $data) : \Illuminate\Validation\Validator
59 59
     {
60
-        return Validator::make($data, $this->rules());
60
+        return Validator::make ($data, $this->rules ());
61 61
     }
62 62
 }
Please login to merge, or discard this patch.