| Conditions | 5 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 51 | 1 | public function getAllData(string $search = null) : array |
|
| 52 | { |
||
| 53 | 1 | $url = ["$this->baseAddress/geocode/v1/json?q=" . urlencode($search) . "&key=$this->apiKey"]; |
|
| 54 | 1 | $data = $this->multiCurl->get($url); |
|
| 55 | 1 | $data = count($data) > 0 ? $data[0] : null; |
|
| 56 | |||
| 57 | 1 | if ($data && array_key_exists("results", $data) && !empty($data["results"][0])) { |
|
| 58 | 1 | $this->allData = $data["results"][0]; |
|
| 59 | } |
||
| 60 | |||
| 61 | 1 | return $this->allData; |
|
| 62 | } |
||
| 64 |