@@ -14,6 +14,6 @@ |
||
14 | 14 | { |
15 | 15 | $parameters = Collection::make($parameters); |
16 | 16 | |
17 | - return new static('Invalid phone validation parameters: "' . $parameters->implode(',') . '".'); |
|
17 | + return new static('Invalid phone validation parameters: "'.$parameters->implode(',').'".'); |
|
18 | 18 | } |
19 | 19 | } |
20 | 20 | \ No newline at end of file |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | return new static( |
16 | 16 | libNumberParseException::INVALID_COUNTRY_CODE, |
17 | - 'Country specification for number "' . $number . '" required.' |
|
17 | + 'Country specification for number "'.$number.'" required.' |
|
18 | 18 | ); |
19 | 19 | } |
20 | 20 | } |
21 | 21 | \ No newline at end of file |
@@ -10,6 +10,6 @@ |
||
10 | 10 | */ |
11 | 11 | public static function invalid($country) |
12 | 12 | { |
13 | - return new static('Invalid country code "' . $country . '".'); |
|
13 | + return new static('Invalid country code "'.$country.'".'); |
|
14 | 14 | } |
15 | 15 | } |
@@ -10,6 +10,6 @@ |
||
10 | 10 | */ |
11 | 11 | public static function invalid($format) |
12 | 12 | { |
13 | - return new static('Invalid number format "' . $format . '".'); |
|
13 | + return new static('Invalid number format "'.$format.'".'); |
|
14 | 14 | } |
15 | 15 | } |
16 | 16 | \ No newline at end of file |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | use Propaganistas\LaravelPhone\PhoneNumber; |
4 | 4 | |
5 | -if (! function_exists('phone')) { |
|
5 | +if (!function_exists('phone')) { |
|
6 | 6 | /** |
7 | 7 | * Get a PhoneNumber instance or a formatted string. |
8 | 8 | * |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | { |
16 | 16 | $phone = PhoneNumber::make($number, $country); |
17 | 17 | |
18 | - if (! is_null($format)) { |
|
18 | + if (!is_null($format)) { |
|
19 | 19 | return $phone->format($format); |
20 | 20 | } |
21 | 21 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function register() |
31 | 31 | { |
32 | - $this->app->singleton('libphonenumber', function ($app) { |
|
32 | + $this->app->singleton('libphonenumber', function($app) { |
|
33 | 33 | return PhoneNumberUtil::getInstance(); |
34 | 34 | }); |
35 | 35 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $extend = static::canUseDependentValidation() ? 'extendDependent' : 'extend'; |
45 | 45 | |
46 | - $this->app['validator']->{$extend}('phone', Validation\Phone::class . '@validate'); |
|
46 | + $this->app['validator']->{$extend}('phone', Validation\Phone::class.'@validate'); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | protected function registerRule() |
53 | 53 | { |
54 | 54 | if (class_exists('Illuminate\Validation\Rule') && class_uses(Rule::class, Macroable::class)) { |
55 | - Rule::macro('phone', function () { |
|
55 | + Rule::macro('phone', function() { |
|
56 | 56 | return new Rules\Phone; |
57 | 57 | }); |
58 | 58 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function formatForCountry($country) |
170 | 170 | { |
171 | - if (! static::isValidCountryCode($country)) { |
|
171 | + if (!static::isValidCountryCode($country)) { |
|
172 | 172 | throw CountryCodeException::invalid($country); |
173 | 173 | } |
174 | 174 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public function formatForMobileDialingInCountry($country, $removeFormatting = false) |
190 | 190 | { |
191 | - if (! static::isValidCountryCode($country)) { |
|
191 | + if (!static::isValidCountryCode($country)) { |
|
192 | 192 | throw CountryCodeException::invalid($country); |
193 | 193 | } |
194 | 194 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | */ |
207 | 207 | public function getCountry() |
208 | 208 | { |
209 | - if (! $this->country) { |
|
209 | + if (!$this->country) { |
|
210 | 210 | $this->country = $this->filterValidCountry($this->countries); |
211 | 211 | } |
212 | 212 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | protected function filterValidCountry($countries) |
224 | 224 | { |
225 | 225 | $result = Collection::make($countries) |
226 | - ->filter(function ($country) { |
|
226 | + ->filter(function($country) { |
|
227 | 227 | $instance = $this->lib->parse($this->number, $country); |
228 | 228 | |
229 | 229 | return $this->lenient |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $phoneNumber = PhoneNumber::make($value, $country); |
62 | 62 | |
63 | 63 | // Type validation. |
64 | - if (! empty($types) && ! $phoneNumber->isOfType($types)) { |
|
64 | + if (!empty($types) && !$phoneNumber->isOfType($types)) { |
|
65 | 65 | continue; |
66 | 66 | } |
67 | 67 |
@@ -151,11 +151,11 @@ |
||
151 | 151 | $parameters = implode(',', array_merge( |
152 | 152 | $this->allowedCountries, |
153 | 153 | $this->allowedTypes, |
154 | - ($this->countryField ? [$this->countryField]: []), |
|
154 | + ($this->countryField ? [$this->countryField] : []), |
|
155 | 155 | ($this->detect ? ['AUTO'] : []), |
156 | 156 | ($this->lenient ? ['LENIENT'] : []) |
157 | 157 | )); |
158 | 158 | |
159 | - return 'phone' . (! empty($parameters) ? ":$parameters" : ''); |
|
159 | + return 'phone'.(!empty($parameters) ? ":$parameters" : ''); |
|
160 | 160 | } |
161 | 161 | } |
162 | 162 | \ No newline at end of file |