Skip to content

Commit

Permalink
The parenthesis was in the wrong place, so the exception never occurr…
Browse files Browse the repository at this point in the history
…ed (#42)
  • Loading branch information
code2prog committed Dec 7, 2020
1 parent 9783966 commit 6f4e5e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Drivers/IpStackDriver.php
Expand Up @@ -9,7 +9,7 @@
class IpStackDriver extends AbstractGeoIPDriver
{
/**
* @param array $config
* @param array $config
*/
public function __construct(array $config, GuzzleClient $guzzle = null)
{
Expand All @@ -23,7 +23,7 @@ public function __construct(array $config, GuzzleClient $guzzle = null)
/**
* Get array of data using ipstack.
*
* @param string $ip
* @param string $ip
*
* @return array
*/
Expand Down Expand Up @@ -51,15 +51,15 @@ public function get($ip)
/**
* Get the raw GeoIP info using ipstack.
*
* @param string $ip
* @param string $ip
*
* @return array
*/
public function getRaw($ip)
{
$data = json_decode($this->guzzle->get($this->getUrl($ip))->getBody(), true);

if (Arr::get($data, 'success') === false && Arr::get($data, 'error.type' === 'invalid_access_key')) {
if (Arr::get($data, 'success') === false && Arr::get($data, 'error.type') === 'invalid_access_key') {
throw new InvalidCredentialsException();
}

Expand All @@ -69,7 +69,7 @@ public function getRaw($ip)
/**
* Get the ipstack url.
*
* @param string $ip
* @param string $ip
*
* @return string
*/
Expand Down

0 comments on commit 6f4e5e3

Please sign in to comment.