Completed
Push — master ( 5c13d8...08a414 )
by Tyler
02:01
created
src/Telephone.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @param string $input  The phone number
51 51
      * @param string $region The region or country of the phone number
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;
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
 
85 85
     protected function extractAreaCode()
86 86
     {
87
-        if($this->region === 'US' && $this->isValid()){
87
+        if ($this->region === 'US' && $this->isValid()) {
88 88
             $exp = '/^\+?(1)?\s?\(?(\d{3})\)?(?:\s|\.|\-)?(\d{3})(?:\s|\.|\-)?(\d{4})$/';
89
-            preg_match($exp,$this->format_E164,$matches);
90
-            if(count($matches) === 5){
89
+            preg_match($exp, $this->format_E164, $matches);
90
+            if (count($matches) === 5) {
91 91
                 return $matches[2];
92 92
             }
93 93
         }
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
 
98 98
     protected function extractSubscriberCode()
99 99
     {
100
-        if($this->region === 'US' && $this->isValid()){
100
+        if ($this->region === 'US' && $this->isValid()) {
101 101
             $exp = '/^\+?(1)?\s?\(?(\d{3})\)?(?:\s|\.|\-)?(\d{3})(?:\s|\.|\-)?(\d{4})$/';
102
-            preg_match($exp,$this->format_E164,$matches);
103
-            if(count($matches) === 5){
104
-                return $matches[3] . $matches[4];
102
+            preg_match($exp, $this->format_E164, $matches);
103
+            if (count($matches) === 5) {
104
+                return $matches[3].$matches[4];
105 105
             }
106 106
         }
107 107
 
Please login to merge, or discard this patch.