@@ -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 | } |