@@ -62,14 +62,14 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function __construct($driverResponse) |
64 | 64 | { |
65 | - $this->ip = $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 = $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 |
||
81 | 81 | { |
82 | 82 | $data = $this->toArray(); |
83 | 83 | |
84 | - unset($data['ip']); |
|
84 | + unset($data[ 'ip' ]); |
|
85 | 85 | |
86 | 86 | return empty(array_filter($data)); |
87 | 87 | } |