Passed
Push — 1.x ( 938550...cada6e )
by Milwad
03:42 queued 14s
created
src/LaravelValidateServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
      */
83 83
     public function boot(): void
84 84
     {
85
-        $countries = config('laravel-validate.phone-country', []);
85
+        $countries = config('laravel-validate.phone-country', [ ]);
86 86
 
87 87
         foreach ($countries as $code => $country) {
88 88
             CountryPhoneCallback::addValidator($code, $country);
Please login to merge, or discard this patch.
src/Utils/CountryPhoneCallback.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 CountryPhoneValidator) {
22
+        if ( ! new $validator instanceof CountryPhoneValidator) {
23 23
             throw new RuntimeException('The validator is not instance of CountryPhoneValidator');
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 callPhoneValidator(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.