| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 6 | public function getLocation($ipAddress) : array |
|
| 23 | { |
||
| 24 | 6 | $apiCall = curl_init('http://api.ipstack.com/'.$ipAddress.'?access_key='.$this->accessKey.''); |
|
| 25 | 6 | curl_setopt($apiCall, CURLOPT_RETURNTRANSFER, true); |
|
| 26 | |||
| 27 | 6 | $json = curl_exec($apiCall); |
|
| 28 | 6 | curl_close($apiCall); |
|
| 29 | |||
| 30 | 6 | $apiResult = json_decode($json, true); |
|
| 31 | $filtered = [ |
||
| 32 | 6 | "ip" => $apiResult["ip"], |
|
| 33 | 6 | "type" => $apiResult["type"], |
|
| 34 | 6 | "country_name" => $apiResult["country_name"], |
|
| 35 | 6 | "city" => $apiResult["city"], |
|
| 36 | 6 | "latitude" => $apiResult["latitude"], |
|
| 37 | 6 | "longitud" => $apiResult["longitude"] |
|
| 38 | ]; |
||
| 39 | |||
| 40 | 6 | return $filtered; |
|
| 41 | } |
||
| 43 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths