Passed
Push — npm/audit-fix ( 9e66ec )
by Yonathan
29:50 queued 14:40
created
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/ApplicantHasRelationRule.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      * @param  string  $relation
19 19
      * @return void
20 20
      */
21
-    public function __construct($applicant, $relation)
21
+    public function __construct ($applicant, $relation)
22 22
     {
23 23
         $this->applicant = $applicant;
24 24
         $this->relation = $relation;
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
      * @param  [type] $value     [description]
31 31
      * @return [type]            [description]
32 32
      */
33
-    public function passes($attribute, $value)
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
-    public function message()
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/LinkedInUrlRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
      * @param  mixed   $value
22 22
      * @return boolean
23 23
      */
24
-    public function passes($attribute, $value)
24
+    public function passes ($attribute, $value)
25 25
     {
26
-        return preg_match('/' . self::PATTERN . '/', $value);
26
+        return preg_match ('/'.self::PATTERN.'/', $value);
27 27
     }
28 28
 
29 29
     /**
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
      *
32 32
      * @return string
33 33
      */
34
-    public function message()
34
+    public function message ()
35 35
     {
36
-        return Lang::get('validation.custom.linkedin_url');
36
+        return Lang::get ('validation.custom.linkedin_url');
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/PassesValidatorRule.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      * @param  string  $relation
18 18
      * @return void
19 19
      */
20
-    public function __construct($validator)
20
+    public function __construct ($validator)
21 21
     {
22 22
         $this->validator = $validator;
23 23
     }
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
      * @param  [type] $value     [description]
30 30
      * @return boolean            [description]
31 31
      */
32
-    public function passes($attribute, $value)
32
+    public function passes ($attribute, $value)
33 33
     {
34
-        return $value->contains(function ($object) {
35
-            $object->getRelationValue($this->relationName)->is($this->relationValue);
34
+        return $value->contains (function ($object) {
35
+            $object->getRelationValue ($this->relationName)->is ($this->relationValue);
36 36
         });
37 37
     }
38 38
 
39
-    public function message()
39
+    public function message ()
40 40
     {
41
-        return Lang::get('validation.contains_object_with_relation', ['relation' => $this->relationName]);
41
+        return Lang::get ('validation.contains_object_with_relation', ['relation' => $this->relationName]);
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/ContainsObjectWithAttributeRule.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,16 +18,16 @@  discard block
 block discarded – undo
18 18
      * @param  string  $relation
19 19
      * @return void
20 20
      */
21
-    public function __construct($attributeName, $attributeValue)
21
+    public function __construct ($attributeName, $attributeValue)
22 22
     {
23 23
         $this->attributeName = $attributeName;
24 24
         $this->attributeValue = $attributeValue;
25 25
     }
26 26
 
27
-    protected function array_any(array $array, callable $fn)
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
         }
@@ -41,18 +41,18 @@  discard block
 block discarded – undo
41 41
      * @param  [type] $value     [description]
42 42
      * @return boolean            [description]
43 43
      */
44
-    public function passes($attribute, $value)
44
+    public function passes ($attribute, $value)
45 45
     {
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
-    public function message()
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/Rules/SkillDeclarationBelongsToUserRule.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@
 block discarded – undo
16 16
      * @param  [type] $value     [description]
17 17
      * @return [type]            [description]
18 18
      */
19
-    public function passes($attribute, $value)
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
-    public function message()
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/Contracts/DataValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
      * @param mixed[] $data The data to validate.
11 11
      * @return void
12 12
      */
13
-    public function validate(array $data): void;
13
+    public function validate (array $data): void;
14 14
 
15 15
     /**
16 16
      * Returns a laravel validator object made with this data.
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      * @param mixed[] $data Data to validate.
19 19
      * @return \Illuminate\Validation\Validator
20 20
      */
21
-    public function validator(array $data): \Illuminate\Validation\Validator;
21
+    public function validator (array $data): \Illuminate\Validation\Validator;
22 22
 
23 23
     /**
24 24
      * Returns true if the validator passes.
@@ -26,5 +26,5 @@  discard block
 block discarded – undo
26 26
      * @param mixed[] $data Data to validate.
27 27
      * @return boolean
28 28
      */
29
-    public function isValid(array $data): bool;
29
+    public function isValid (array $data): bool;
30 30
 }
Please login to merge, or discard this patch.
app/Services/Validation/BaseDataValidator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
      * @param mixed[] $data The data to validate.
13 13
      * @return void
14 14
      */
15
-    public function validate(array $data): void
15
+    public function validate (array $data): void
16 16
     {
17
-        $this->validator($data)->validate();
17
+        $this->validator ($data)->validate ();
18 18
     }
19 19
 
20 20
     /**
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
      * @param mixed[] $data Data to validate.
24 24
      * @return boolean
25 25
      */
26
-    public function isValid(array $data) : bool
26
+    public function isValid (array $data) : bool
27 27
     {
28
-        return $this->validator($data)->passes();
28
+        return $this->validator ($data)->passes ();
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
app/Services/Validation/RegistrationValidator.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 class RegistrationValidator
9 9
 {
10
-    public static function basicRules()
10
+    public static function basicRules ()
11 11
     {
12 12
         return [
13 13
             'first_name' => 'required|string|max:255',
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         ];
23 23
     }
24 24
 
25
-    public static function managerRegistrationExtraRules()
25
+    public static function managerRegistrationExtraRules ()
26 26
     {
27 27
         return [
28 28
             'department' => 'required|integer',
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
      * @param  array $data Incoming registration data.
37 37
      * @return \Illuminate\Contracts\Validation\Validator
38 38
      */
39
-    public static function userValidator(array $data)
39
+    public static function userValidator (array $data)
40 40
     {
41
-        return Validator::make($data, self::basicRules());
41
+        return Validator::make ($data, self::basicRules ());
42 42
     }
43 43
 
44 44
     /**
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
      * @param  array $data Incoming registration data.
48 48
      * @return \Illuminate\Contracts\Validation\Validator
49 49
      */
50
-    public static function managerValidator(array $data)
50
+    public static function managerValidator (array $data)
51 51
     {
52
-        $managerRules = array_merge(self::basicRules(), self::managerRegistrationExtraRules());
53
-        return Validator::make($data, $managerRules);
52
+        $managerRules = array_merge (self::basicRules (), self::managerRegistrationExtraRules ());
53
+        return Validator::make ($data, $managerRules);
54 54
     }
55 55
 
56 56
     /**
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
      * @param  array $data Incoming registration data.
60 60
      * @return \Illuminate\Contracts\Validation\Validator
61 61
      */
62
-    public static function finalizeManagerValidator(array $data)
62
+    public static function finalizeManagerValidator (array $data)
63 63
     {
64
-        return Validator::make($data, self::managerRegistrationExtraRules());
64
+        return Validator::make ($data, self::managerRegistrationExtraRules ());
65 65
     }
66 66
 }
Please login to merge, or discard this patch.