Skip to content

Commit 94bb648

Browse files
authored
[Google Maps] Added missing nullable return type (#1065)
Sometimes Google Maps does not return a Plus Code. PoC: {"query":"[object] (Geocoder\\Query\\GeocodeQuery: GeocodeQuery: {\"text\":\"Port of Ijmuiden, North Holland, Netherlands, Port Ijmuiden Port\",\"bounds\":\"null\",\"locale\":null,\"limit\":5,\"data\":{\"mode\":\"search\",\"fields\":\"formatted_address, geometry, icon, name, place_id, plus_code, types\"}})"} The first 2 results have a PlusCode but the rest do not, which generates an exception.
1 parent 1f88358 commit 94bb648

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Provider/GoogleMapsPlaces/Model/GooglePlace.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function withIcon(string $icon = null)
194194
/**
195195
* @return PlusCode|null
196196
*/
197-
public function getPlusCode(): PlusCode
197+
public function getPlusCode(): ?PlusCode
198198
{
199199
return $this->plusCode;
200200
}

0 commit comments

Comments
 (0)