@@ -82,7 +82,7 @@ |
||
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); |
@@ -10,7 +10,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |