Conditions | 4 |
Paths | 4 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
37 | /** |
||
38 | * @param string $url |
||
39 | * |
||
40 | * @return Collection |
||
41 | */ |
||
42 | 7 | protected function executeQuery(string $url): AddressCollection |
|
43 | { |
||
44 | 7 | $content = $this->getUrlContents($url); |
|
45 | 2 | $data = json_decode($content, true); |
|
46 | |||
47 | 2 | if (!$data) { |
|
48 | return new AddressCollection([]); |
||
49 | } |
||
50 | |||
51 | 2 | return $this->prepareAddressCollection($data); |
|
52 | } |
||
53 | } |
||
54 |