@@ 118-121 (lines=4) @@ | ||
115 | ||
116 | $url = sprintf('%s&style=FULL', $url); |
|
117 | ||
118 | if (null !== $locale) { |
|
119 | // Locale code transformation: for example from it_IT to it |
|
120 | $url = sprintf('%s&lang=%s', $url, substr($locale, 0, 2)); |
|
121 | } |
|
122 | ||
123 | $content = $this->getUrlContents($url); |
|
124 | if (null === $json = json_decode($content)) { |
|
@@ 175-178 (lines=4) @@ | ||
172 | */ |
|
173 | private function executeQuery(string $url, string $locale = null): AddressCollection |
|
174 | { |
|
175 | if (null !== $locale) { |
|
176 | // Locale code transformation: for example from it_IT to it |
|
177 | $url = sprintf('%s&lang=%s', $url, substr($locale, 0, 2)); |
|
178 | } |
|
179 | ||
180 | $content = $this->getUrlContents($url); |
|
181 | if (null === $json = json_decode($content)) { |