Passed
Push — 1.x ( ced68d...fcb885 )
by Milwad
01:14 queued 14s
created
src/LaravelValidateServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function boot(): void
62 62
     {
63
-        $countries = config('laravel-validate.phone-country', []);
63
+        $countries = config('laravel-validate.phone-country', [ ]);
64 64
 
65 65
         foreach ($countries as $code => $country) {
66 66
             CountryPhoneCallback::addValidator($code, $country);
67 67
         }
68 68
 
69
-        $landlineCountries = config('laravel-validate.landline-country', []);
69
+        $landlineCountries = config('laravel-validate.landline-country', [ ]);
70 70
 
71 71
         foreach ($landlineCountries as $code => $country) {
72 72
             CountryLandlineCallback::addValidator($code, $country);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
                 Validator::extend(
83 83
                     $rule->getFilenameWithoutExtension(),
84
-                    function ($attribute, $value, $parameters, $validator) use ($className) {
84
+                    function($attribute, $value, $parameters, $validator) use ($className) {
85 85
                         return (new $className($parameters))->passes($attribute, $value);
86 86
                     }
87 87
                 );
Please login to merge, or discard this patch.
src/Utils/CountryLandlineCallback.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     /**
11 11
      * Country Validate classes.
12 12
      */
13
-    protected static array $validators = [];
13
+    protected static array $validators = [ ];
14 14
 
15 15
     /**
16 16
      * Add new country validator.
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public static function addValidator(string $code, string $validator): void
21 21
     {
22
-        if (! new $validator instanceof CountryLandlineValidator) {
22
+        if ( ! new $validator instanceof CountryLandlineValidator) {
23 23
             throw new RuntimeException('The validator is not instance of CountryLandlineValidator');
24 24
         }
25 25
 
26
-        self::$validators[$code] = $validator;
26
+        self::$validators[ $code ] = $validator;
27 27
     }
28 28
 
29 29
     /**
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public static function callLandlineValidator(string $code, $value)
33 33
     {
34
-        if (isset(self::$validators[$code])) {
35
-            return (new self::$validators[$code])->validate($value);
34
+        if (isset(self::$validators[ $code ])) {
35
+            return (new self::$validators[ $code ])->validate($value);
36 36
         } else {
37 37
             throw new \BadMethodCallException("Validator method for '$code' does not exist.");
38 38
         }
Please login to merge, or discard this patch.