Skip to content

Commit 30164f3

Browse files
Apply fixes from StyleCI (#51)
Co-authored-by: StyleCI Bot <[email protected]>
1 parent 0f5cf49 commit 30164f3

File tree

11 files changed

+29
-46
lines changed

11 files changed

+29
-46
lines changed

src/Console/UpdateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class UpdateCommand extends Command
3131
/**
3232
* Create a new console command instance.
3333
*
34-
* @param Config $config
34+
* @param Config $config
3535
*/
3636
public function __construct(array $config)
3737
{

src/Drivers/AbstractGeoIPDriver.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ abstract class AbstractGeoIPDriver
1717
protected $guzzle;
1818

1919
/**
20-
* @param array $config
20+
* @param array $config
2121
*/
2222
public function __construct(array $config, GuzzleClient $guzzle = null)
2323
{
@@ -29,17 +29,15 @@ public function __construct(array $config, GuzzleClient $guzzle = null)
2929
/**
3030
* Get GeoIP info from IP.
3131
*
32-
* @param string $ip
33-
*
32+
* @param string $ip
3433
* @return array
3534
*/
3635
abstract public function get($ip);
3736

3837
/**
3938
* Get the raw GeoIP info from the driver.
4039
*
41-
* @param string $ip
42-
*
40+
* @param string $ip
4341
* @return mixed
4442
*/
4543
abstract public function getRaw($ip);

src/Drivers/IPApiDriver.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ class IPApiDriver extends AbstractGeoIPDriver
99
/**
1010
* Get array of data using ip-api.
1111
*
12-
* @param string $ip
13-
*
12+
* @param string $ip
1413
* @return array
1514
*/
1615
public function get($ip)
@@ -37,8 +36,7 @@ public function get($ip)
3736
/**
3837
* Get the raw GeoIP info using ip-api.
3938
*
40-
* @param string $ip
41-
*
39+
* @param string $ip
4240
* @return array
4341
*/
4442
public function getRaw($ip)
@@ -50,8 +48,7 @@ public function getRaw($ip)
5048
* Get the ip-api url add key and
5149
* change base url if pro user.
5250
*
53-
* @param string $ip
54-
*
51+
* @param string $ip
5552
* @return string
5653
*/
5754
protected function getUrl($ip)

src/Drivers/IpStackDriver.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public function __construct(array $config, GuzzleClient $guzzle = null)
2424
* Get array of data using ipstack.
2525
*
2626
* @param string $ip
27-
*
2827
* @return array
2928
*/
3029
public function get($ip)
@@ -52,7 +51,6 @@ public function get($ip)
5251
* Get the raw GeoIP info using ipstack.
5352
*
5453
* @param string $ip
55-
*
5654
* @return array
5755
*/
5856
public function getRaw($ip)
@@ -70,7 +68,6 @@ public function getRaw($ip)
7068
* Get the ipstack url.
7169
*
7270
* @param string $ip
73-
*
7471
* @return string
7572
*/
7673
protected function getUrl($ip)

src/Drivers/MaxmindApiDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class MaxmindApiDriver extends MaxmindDriver
1111
/**
1212
* Create the maxmind web client.
1313
*
14-
* @throws \PulkitJalan\GeoIP\Exceptions\InvalidCredentialsException
15-
*
1614
* @return \GeoIp2\WebService\Client
15+
*
16+
* @throws \PulkitJalan\GeoIP\Exceptions\InvalidCredentialsException
1717
*/
1818
protected function create()
1919
{

src/Drivers/MaxmindDatabaseDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class MaxmindDatabaseDriver extends MaxmindDriver
1313
/**
1414
* Create the maxmind database reader.
1515
*
16-
* @throws \PulkitJalan\GeoIP\Exceptions\InvalidCredentialsException
17-
*
1816
* @return \GeoIp2\Database\Reader
17+
*
18+
* @throws \PulkitJalan\GeoIP\Exceptions\InvalidCredentialsException
1919
*/
2020
protected function create()
2121
{

src/Drivers/MaxmindDriver.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ abstract class MaxmindDriver extends AbstractGeoIPDriver
1313
protected $maxmind;
1414

1515
/**
16-
* @param array $config
16+
* @param array $config
1717
*/
1818
public function __construct(array $config, GuzzleClient $guzzle = null)
1919
{
@@ -25,8 +25,7 @@ public function __construct(array $config, GuzzleClient $guzzle = null)
2525
/**
2626
* Get array of data using Maxmind.
2727
*
28-
* @param string $ip
29-
*
28+
* @param string $ip
3029
* @return array
3130
*/
3231
public function get($ip)
@@ -55,8 +54,7 @@ public function get($ip)
5554
/**
5655
* Get the raw GeoIP info using Maxmind.
5756
*
58-
* @param string $ip
59-
*
57+
* @param string $ip
6058
* @return mixed
6159
*/
6260
public function getRaw($ip)
@@ -73,9 +71,9 @@ public function getRaw($ip)
7371
/**
7472
* Create the maxmind driver based on config.
7573
*
76-
* @throws \PulkitJalan\GeoIP\Exceptions\InvalidCredentialsException
77-
*
7874
* @return mixed
75+
*
76+
* @throws \PulkitJalan\GeoIP\Exceptions\InvalidCredentialsException
7977
*/
8078
abstract protected function create();
8179
}

src/Drivers/TelizeDriver.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class TelizeDriver extends AbstractGeoIPDriver
1010
{
1111
/**
12-
* @param array $config
12+
* @param array $config
1313
*/
1414
public function __construct(array $config, GuzzleClient $guzzle = null)
1515
{
@@ -23,8 +23,7 @@ public function __construct(array $config, GuzzleClient $guzzle = null)
2323
/**
2424
* Get array of data using telize.
2525
*
26-
* @param string $ip
27-
*
26+
* @param string $ip
2827
* @return array
2928
*/
3029
public function get($ip)
@@ -51,8 +50,7 @@ public function get($ip)
5150
/**
5251
* Get the raw GeoIP info using telize.
5352
*
54-
* @param string $ip
55-
*
53+
* @param string $ip
5654
* @return array
5755
*/
5856
public function getRaw($ip)
@@ -68,8 +66,7 @@ public function getRaw($ip)
6866
/**
6967
* Get the telize url.
7068
*
71-
* @param string $ip
72-
*
69+
* @param string $ip
7370
* @return string
7471
*/
7572
protected function getUrl($ip)

src/GeoIP.php

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public function getDriver()
5858
*
5959
* @var string
6060
*
61-
* @param string $ip
62-
*
61+
* @param string $ip
6362
* @return GeoIP
6463
*/
6564
public function setIp($ip)
@@ -96,8 +95,7 @@ public function getIp()
9695
* Get an array or single item of geoip data
9796
* Also stores data in memory for further requests.
9897
*
99-
* @param string $property
100-
*
98+
* @param string $property
10199
* @return array|string
102100
*/
103101
public function get($property = '')
@@ -115,7 +113,6 @@ public function get($property = '')
115113
* Get the raw geoip data from the driver.
116114
*
117115
* @param string
118-
*
119116
* @return mixed
120117
*/
121118
public function getRaw()
@@ -143,9 +140,9 @@ public function getRaw()
143140
/**
144141
* Get an array or single item of geoip data.
145142
*
146-
* @throws \PulkitJalan\GeoIP\Exceptions\GeoIPException
147-
*
148143
* @return array
144+
*
145+
* @throws \PulkitJalan\GeoIP\Exceptions\GeoIPException
149146
*/
150147
protected function getData()
151148
{
@@ -172,12 +169,11 @@ protected function getData()
172169
/**
173170
* Magic call method for get*.
174171
*
175-
* @param string $method
176-
* @param array $parameters
172+
* @param string $method
173+
* @param array $parameters
174+
* @return mixed
177175
*
178176
* @throws \BadMethodCallException
179-
*
180-
* @return mixed
181177
*/
182178
public function __call($method, $parameters)
183179
{

src/GeoIPManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class GeoIPManager
2626
protected $guzzle;
2727

2828
/**
29-
* @param array $config
29+
* @param array $config
3030
*/
3131
public function __construct(array $config, GuzzleClient $guzzle = null)
3232
{

0 commit comments

Comments
 (0)