@@ -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 ($this->isInputField($countryField)) { |
151 | 151 | $this->countries = array(array_get($this->data, $countryField)); |
@@ -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. |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public function isInputField($field) |
228 | 228 | { |
229 | - return ! is_null(array_get($this->data, $field)); |
|
229 | + return !is_null(array_get($this->data, $field)); |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | /** |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | // Legacy support. |
252 | 252 | $type = ($type == 'LANDLINE' ? 'FIXED_LINE' : $type); |
253 | 253 | |
254 | - return defined('\libphonenumber\PhoneNumberType::' . $type); |
|
254 | + return defined('\libphonenumber\PhoneNumberType::'.$type); |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | } |