Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored and github-actions[bot] committed Oct 17, 2023
1 parent 65df1de commit 63cece6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Geocoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,19 @@ public function getAllAddressesForCoordinates(float $lat, float $lng): array
$payload = $this->getRequestPayload([
'latlng' => "$lat,$lng",
]);

$response = $this->client->request('GET', $this->endpoint, $payload);

if ($response->getStatusCode() !== 200) {
throw CouldNotGeocode::couldNotConnect();
}

$reverseGeocodingResponse = json_decode($response->getBody());

if (! empty($reverseGeocodingResponse->error_message)) {
throw CouldNotGeocode::serviceReturnedError($reverseGeocodingResponse->error_message);
}

if (! count($reverseGeocodingResponse->results)) {
return $this->emptyResponse();
}
Expand Down

0 comments on commit 63cece6

Please sign in to comment.