Passed
Push — master ( 24448e...4daf45 )
by Ger
04:03
created
src/GeoLocation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         $driver = config('geo-location.driver');
63 63
 
64 64
         if (!class_exists($driver)) {
65
-            throw new DriverDoesNotExistException('The geo-location driver ' .  $driver . ' does not exist.');
65
+            throw new DriverDoesNotExistException('The geo-location driver ' . $driver . ' does not exist.');
66 66
         }
67 67
 
68 68
         return new $driver();
Please login to merge, or discard this patch.
src/GeoLocationServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,6 +41,6 @@
 block discarded – undo
41 41
      */
42 42
     public function provides()
43 43
     {
44
-        return ['geo-location'];
44
+        return [ 'geo-location' ];
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
src/Response.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function __construct($driverResponse)
64 64
     {
65
-        $this->ip          = isset($driverResponse['ip']) ?? $driverResponse['IPv4'];
66
-        $this->countryCode = $driverResponse['country_code'];
67
-        $this->countryName = $driverResponse['country_name'];
68
-        $this->regionName  = $driverResponse['state'];
69
-        $this->cityName    = $driverResponse['city'];
70
-        $this->zipCode     = $driverResponse['postal'];
71
-        $this->latitude    = $driverResponse['latitude'];
72
-        $this->longitude   = $driverResponse['longitude'];
65
+        $this->ip          = isset($driverResponse[ 'ip' ]) ?? $driverResponse[ 'IPv4' ];
66
+        $this->countryCode = $driverResponse[ 'country_code' ];
67
+        $this->countryName = $driverResponse[ 'country_name' ];
68
+        $this->regionName  = $driverResponse[ 'state' ];
69
+        $this->cityName    = $driverResponse[ 'city' ];
70
+        $this->zipCode     = $driverResponse[ 'postal' ];
71
+        $this->latitude    = $driverResponse[ 'latitude' ];
72
+        $this->longitude   = $driverResponse[ 'longitude' ];
73 73
     }
74 74
 
75 75
     /**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $data = $this->toArray();
83 83
 
84
-        unset($data['IPv4']);
84
+        unset($data[ 'IPv4' ]);
85 85
 
86 86
         return empty(array_filter($data));
87 87
     }
Please login to merge, or discard this patch.