| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class IpCheckCoordinates |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Check ip-type |
||
| 9 | * |
||
| 10 | * @return array |
||
| 11 | */ |
||
| 12 | |||
| 13 | 9 | public function __construct($di) |
|
| 14 | { |
||
| 15 | 9 | $this->di = $di; |
|
|
|
|||
| 16 | //$this->ipCheckKey = $this->apiKeys->ipCheck; |
||
| 17 | 9 | $this->baseUrl = "http://api.ipstack.com/"; |
|
| 18 | 9 | $this->apiKeys = $this->di->get("apikeys")["config"]["ipCheck"]; |
|
| 19 | 9 | } |
|
| 20 | |||
| 21 | /** |
||
| 22 | * Check ip-type |
||
| 23 | * |
||
| 24 | * @return array containing coordinates, country and town for IP if available |
||
| 25 | */ |
||
| 26 | 3 | public function ipCheckCoordinates(string $ipnumber) |
|
| 36 | } |
||
| 37 | } |
||
| 38 |