| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 3 | public function ipCheckCoordinates(string $ipnumber) |
|
| 27 | { |
||
| 28 | 3 | $accessKey = $this->apiKeys; |
|
| 29 | 3 | $url = ($this->baseUrl . $ipnumber . "?access_key=" . $accessKey); |
|
| 30 | |||
| 31 | 3 | $cURL = new CURL; |
|
| 32 | 3 | $result = $cURL->req($url); |
|
| 33 | 3 | $result = json_decode($result); |
|
| 34 | |||
| 35 | 3 | return array($result->latitude, $result->longitude, $result->country_name, $result->city); |
|
| 36 | } |
||
| 38 |