@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Zenapply\DataTypes; |
4 | 4 | |
5 | -use libphonenumber\PhoneNumberUtil as Util; |
|
6 | 5 | use libphonenumber\PhoneNumberFormat as Format; |
7 | 6 | use libphonenumber\PhoneNumberType as Type; |
7 | +use libphonenumber\PhoneNumberUtil as Util; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * @see https://en.wikipedia.org/wiki/Telephone_numbering_plan#Structure |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @param string $input [description] |
51 | 51 | * @param string $region [description] |
52 | 52 | */ |
53 | - public function __construct($input,$region = 'US') |
|
53 | + public function __construct($input, $region = 'US') |
|
54 | 54 | { |
55 | 55 | $this->input = $input; |
56 | 56 | $this->region = $region; |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | |
84 | 84 | protected function extractAreaCode() |
85 | 85 | { |
86 | - if($this->region === 'US' && $this->isValid()){ |
|
86 | + if ($this->region === 'US' && $this->isValid()) { |
|
87 | 87 | $exp = '/^\+?(1)?\(?(\d{3})\)?(?:\s|\.|\-)?(\d{3})(?:\s|\.|\-)?(\d{4})$/'; |
88 | - preg_match($exp,$this->format_E164,$matches); |
|
89 | - if(count($matches) >= 2){ |
|
88 | + preg_match($exp, $this->format_E164, $matches); |
|
89 | + if (count($matches) >= 2) { |
|
90 | 90 | return $matches[2]; |
91 | 91 | } |
92 | 92 | } |