@@ -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 |
@@ -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 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | public static function isValidType($type) |
| 24 | 24 | { |
| 25 | - return ! empty(static::parseTypes($type)); |
|
| 25 | + return !empty(static::parseTypes($type)); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | static::loadTypes(); |
| 37 | 37 | |
| 38 | 38 | return Collection::make(is_array($types) ? $types : func_get_args()) |
| 39 | - ->map(function ($type) { |
|
| 39 | + ->map(function($type) { |
|
| 40 | 40 | // If the type equals a constant's value, just return it. |
| 41 | 41 | if (in_array($type, static::$types, true)) { |
| 42 | 42 | return $type; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | // Otherwise we'll assume the type is the constant's name. |
| 46 | 46 | return Arr::get(static::$types, strtoupper($type)); |
| 47 | 47 | }) |
| 48 | - ->reject(function ($value) { |
|
| 48 | + ->reject(function($value) { |
|
| 49 | 49 | return is_null($value) || $value === false; |
| 50 | 50 | })->toArray(); |
| 51 | 51 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | private static function loadTypes() |
| 75 | 75 | { |
| 76 | - if (! static::$types) { |
|
| 76 | + if (!static::$types) { |
|
| 77 | 77 | static::$types = with(new ReflectionClass(PhoneNumberType::class))->getConstants(); |
| 78 | 78 | } |
| 79 | 79 | } |