@@ -31,7 +31,7 @@ |
||
| 31 | 31 | public function register() |
| 32 | 32 | { |
| 33 | 33 | // Make libphonenumber available in the application container. |
| 34 | - $this->app->singleton('libphonenumber', function ($app) { |
|
| 34 | + $this->app->singleton('libphonenumber', function($app) { |
|
| 35 | 35 | return PhoneNumberUtil::getInstance(); |
| 36 | 36 | }); |
| 37 | 37 | } |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | use Illuminate\Support\Facades\App; |
| 4 | 4 | use libphonenumber\PhoneNumberFormat; |
| 5 | 5 | |
| 6 | -if (! function_exists('phone_format')) { |
|
| 6 | +if (!function_exists('phone_format')) { |
|
| 7 | 7 | /** |
| 8 | 8 | * Get the PhoneNumberUtil or format a phone number for display. |
| 9 | 9 | * |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | { |
| 14 | 14 | $lib = App::make('libphonenumber'); |
| 15 | 15 | |
| 16 | - if (! $arguments = func_get_args()) { |
|
| 16 | + if (!$arguments = func_get_args()) { |
|
| 17 | 17 | return $lib; |
| 18 | 18 | } |
| 19 | 19 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | -if (! function_exists('phone_format')) { |
|
| 31 | +if (!function_exists('phone_format')) { |
|
| 32 | 32 | /** |
| 33 | 33 | * Formats a phone number and country for display. |
| 34 | 34 | * |
@@ -143,11 +143,11 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | protected function checkCountries($attribute) |
| 145 | 145 | { |
| 146 | - $countryField = (is_null($this->countryField) ? $attribute . '_country' : $this->countryField); |
|
| 146 | + $countryField = (is_null($this->countryField) ? $attribute.'_country' : $this->countryField); |
|
| 147 | 147 | |
| 148 | 148 | if ($this->isInputField($countryField)) { |
| 149 | 149 | $this->countries = [array_get($this->data, $countryField)]; |
| 150 | - } elseif (! $this->autodetect && ! $this->lenient && empty($this->countries)) { |
|
| 150 | + } elseif (!$this->autodetect && !$this->lenient && empty($this->countries)) { |
|
| 151 | 151 | throw new NoValidCountryFoundException; |
| 152 | 152 | } |
| 153 | 153 | } |
@@ -204,8 +204,8 @@ discard block |
||
| 204 | 204 | protected function parseTypes(array $types) |
| 205 | 205 | { |
| 206 | 206 | // Transform types to their namespaced class constant. |
| 207 | - array_walk($types, function (&$type) { |
|
| 208 | - $type = constant('\libphonenumber\PhoneNumberType::' . $type); |
|
| 207 | + array_walk($types, function(&$type) { |
|
| 208 | + $type = constant('\libphonenumber\PhoneNumberType::'.$type); |
|
| 209 | 209 | }); |
| 210 | 210 | |
| 211 | 211 | // Add in the unsure number type if applicable. |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | */ |
| 225 | 225 | public function isInputField($field) |
| 226 | 226 | { |
| 227 | - return ! is_null(array_get($this->data, $field)); |
|
| 227 | + return !is_null(array_get($this->data, $field)); |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | /** |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | // Legacy support. |
| 250 | 250 | $type = ($type == 'LANDLINE' ? 'FIXED_LINE' : $type); |
| 251 | 251 | |
| 252 | - return defined('\libphonenumber\PhoneNumberType::' . strtoupper($type)); |
|
| 252 | + return defined('\libphonenumber\PhoneNumberType::'.strtoupper($type)); |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | } |