Passed
Push — task/common-translation-packag... ( 1125af...852212 )
by Grant
08:02
created
app/Services/Validation/Rules/ApplicantHasRelationRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@
 block discarded – undo
32 32
      */
33 33
     public function passes($attribute, $value)
34 34
     {
35
-        return $this->applicant->getRelationValue($this->relation)
36
-            ->pluck('id')->contains($value);
35
+        return $this->applicant->getRelationValue ($this->relation)
36
+            ->pluck ('id')->contains ($value);
37 37
     }
38 38
 
39 39
     public function message()
40 40
     {
41
-        return Lang::get('validation.applicant_has_relation');
41
+        return Lang::get ('validation.applicant_has_relation');
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/SkillDeclarationBelongsToUserRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@
 block discarded – undo
18 18
      */
19 19
     public function passes($attribute, $value)
20 20
     {
21
-        return SkillDeclaration::find($value) &&
22
-            SkillDeclaration::find($value)->applicant->user->id == Auth::user()->id;
21
+        return SkillDeclaration::find ($value) &&
22
+            SkillDeclaration::find ($value)->applicant->user->id == Auth::user ()->id;
23 23
     }
24 24
 
25 25
     public function message()
26 26
     {
27
-        return Lang::get('validation.user_owns_skill_declaration');
27
+        return Lang::get ('validation.user_owns_skill_declaration');
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
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/PasswordFormatRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@
 block discarded – undo
21 21
 
22 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 27
     public function message() {
28
-        return Lang::get('validation.custom.password');
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/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/ContainsObjectWithAttributeRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     protected function array_any(array $array, callable $fn)
28 28
     {
29 29
         foreach ($array as $value) {
30
-            if ($fn($value)) {
30
+            if ($fn ($value)) {
31 31
                 return true;
32 32
             }
33 33
         }
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
         // debugbar()->debug($value);
47 47
         // debugbar()->debug($this->attributeName);
48 48
         // debugbar()->debug($this->attributeValue);
49
-        return $this->array_any($value, function ($object) {
49
+        return $this->array_any ($value, function ($object) {
50 50
             return $object[$this->attributeName] == $this->attributeValue;
51 51
         });
52 52
     }
53 53
 
54 54
     public function message()
55 55
     {
56
-        return Lang::get('validation.contains_object_with_attribute', ['relation' => $this->attributeName, 'attributeValue' => $this->attributeValue]);
56
+        return Lang::get ('validation.contains_object_with_attribute', ['relation' => $this->attributeName, 'attributeValue' => $this->attributeValue]);
57 57
     }
58 58
 }
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.