Skip to content

Commit 555fdff

Browse files
Update formatResponse to include partial_match (#103)
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.
1 parent 0b90c25 commit 555fdff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Geocoder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ protected function formatResponse($response): array
140140
'formatted_address' => $result->formatted_address,
141141
'viewport' => $result->geometry->viewport,
142142
'address_components' => $result->address_components,
143+
'partial_match' => $result->partial_match,
143144
'place_id' => $result->place_id,
144145
];
145146
}, $response->results);

0 commit comments

Comments
 (0)