Skip to content

Commit 6f4e5e3

Browse files
authored
The parenthesis was in the wrong place, so the exception never occurred (#42)
1 parent 9783966 commit 6f4e5e3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Drivers/IpStackDriver.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class IpStackDriver extends AbstractGeoIPDriver
1010
{
1111
/**
12-
* @param array $config
12+
* @param array $config
1313
*/
1414
public function __construct(array $config, GuzzleClient $guzzle = null)
1515
{
@@ -23,7 +23,7 @@ public function __construct(array $config, GuzzleClient $guzzle = null)
2323
/**
2424
* Get array of data using ipstack.
2525
*
26-
* @param string $ip
26+
* @param string $ip
2727
*
2828
* @return array
2929
*/
@@ -51,15 +51,15 @@ public function get($ip)
5151
/**
5252
* Get the raw GeoIP info using ipstack.
5353
*
54-
* @param string $ip
54+
* @param string $ip
5555
*
5656
* @return array
5757
*/
5858
public function getRaw($ip)
5959
{
6060
$data = json_decode($this->guzzle->get($this->getUrl($ip))->getBody(), true);
6161

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

@@ -69,7 +69,7 @@ public function getRaw($ip)
6969
/**
7070
* Get the ipstack url.
7171
*
72-
* @param string $ip
72+
* @param string $ip
7373
*
7474
* @return string
7575
*/

0 commit comments

Comments
 (0)