@@ -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 (is_numeric($type) && in_array($type, static::$resolvedTypes)) { |
| 42 | 42 | return (int) $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::$resolvedTypes, 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::$resolvedTypes) { |
|
| 76 | + if (!static::$resolvedTypes) { |
|
| 77 | 77 | static::$resolvedTypes = with(new ReflectionClass(PhoneNumberType::class))->getConstants(); |
| 78 | 78 | } |
| 79 | 79 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | */ |
| 171 | 171 | public function formatForCountry($country) |
| 172 | 172 | { |
| 173 | - if (! static::isValidCountryCode($country)) { |
|
| 173 | + if (!static::isValidCountryCode($country)) { |
|
| 174 | 174 | throw CountryCodeException::invalid($country); |
| 175 | 175 | } |
| 176 | 176 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | */ |
| 191 | 191 | public function formatForMobileDialingInCountry($country, $removeFormatting = false) |
| 192 | 192 | { |
| 193 | - if (! static::isValidCountryCode($country)) { |
|
| 193 | + if (!static::isValidCountryCode($country)) { |
|
| 194 | 194 | throw CountryCodeException::invalid($country); |
| 195 | 195 | } |
| 196 | 196 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | */ |
| 209 | 209 | public function getCountry() |
| 210 | 210 | { |
| 211 | - if (! $this->country) { |
|
| 211 | + if (!$this->country) { |
|
| 212 | 212 | $this->country = $this->filterValidCountry($this->countries); |
| 213 | 213 | } |
| 214 | 214 | |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | protected function filterValidCountry($countries) |
| 239 | 239 | { |
| 240 | 240 | $result = Collection::make($countries) |
| 241 | - ->filter(function ($country) { |
|
| 241 | + ->filter(function($country) { |
|
| 242 | 242 | try { |
| 243 | 243 | $instance = $this->lib->parse($this->number, $country); |
| 244 | 244 | |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | $this->getPhoneNumberInstance(), |
| 416 | 416 | $this->getCountry() |
| 417 | 417 | ); |
| 418 | - } catch(Exception $exception) { |
|
| 418 | + } catch (Exception $exception) { |
|
| 419 | 419 | return false; |
| 420 | 420 | } |
| 421 | 421 | } |