@@ -13,15 +13,15 @@ |
||
| 13 | 13 | * @return string |
| 14 | 14 | */ |
| 15 | 15 | function phone_format($phone, $country = null, $format = PhoneNumberFormat::INTERNATIONAL) |
| 16 | - { |
|
| 17 | - $lib = App::make('libphonenumber'); |
|
| 16 | + { |
|
| 17 | + $lib = App::make('libphonenumber'); |
|
| 18 | 18 | |
| 19 | - if (!$country) { |
|
| 20 | - $country = App::getLocale(); |
|
| 21 | - } |
|
| 19 | + if (!$country) { |
|
| 20 | + $country = App::getLocale(); |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | - $phoneNumber = $lib->parse($phone, $country); |
|
| 23 | + $phoneNumber = $lib->parse($phone, $country); |
|
| 24 | 24 | |
| 25 | - return $lib->format($phoneNumber, $format); |
|
| 26 | - } |
|
| 25 | + return $lib->format($phoneNumber, $format); |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | */ |
| 146 | 146 | protected function checkCountries($attribute) |
| 147 | 147 | { |
| 148 | - $countryField = (is_null($this->countryField) ? $attribute . '_country' : $this->countryField); |
|
| 148 | + $countryField = (is_null($this->countryField) ? $attribute.'_country' : $this->countryField); |
|
| 149 | 149 | |
| 150 | 150 | if ($value = $this->isInputField($countryField)) { |
| 151 | 151 | $this->countries = array($value); |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | { |
| 208 | 208 | // Transform types to their namespaced class constant. |
| 209 | 209 | array_walk($types, function(&$type) { |
| 210 | - $type = constant('\libphonenumber\PhoneNumberType::' . $type); |
|
| 210 | + $type = constant('\libphonenumber\PhoneNumberType::'.$type); |
|
| 211 | 211 | }); |
| 212 | 212 | |
| 213 | 213 | // Add in the unsure number type if applicable. |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | // Legacy support. |
| 253 | 253 | $type = ($type == 'LANDLINE' ? 'FIXED_LINE' : $type); |
| 254 | 254 | |
| 255 | - return defined('\libphonenumber\PhoneNumberType::' . $type); |
|
| 255 | + return defined('\libphonenumber\PhoneNumberType::'.$type); |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | } |