Skip to content

Commit

Permalink
Update formatResponse to include partial_match (#103)
Browse files Browse the repository at this point in the history
The Google API returns wether the result is a partial_match (potential misspelling in the search). This is usefull information to return with the result, and is already present in the $result variable. This change also adds the partial_match to the formatted result array.
  • Loading branch information
MultiSuperFreek committed Jun 28, 2022
1 parent 0b90c25 commit 555fdff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Geocoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ protected function formatResponse($response): array
'formatted_address' => $result->formatted_address,
'viewport' => $result->geometry->viewport,
'address_components' => $result->address_components,
'partial_match' => $result->partial_match,
'place_id' => $result->place_id,
];
}, $response->results);
Expand Down

0 comments on commit 555fdff

Please sign in to comment.