@@ -148,7 +148,7 @@ final class Mapbox extends AbstractHttpProvider implements Provider
148148 public function __construct (
149149 ClientInterface $ client ,
150150 string $ accessToken ,
151- string $ country = null ,
151+ ? string $ country = null ,
152152 string $ geocodingMode = self ::GEOCODING_MODE_PLACES
153153 ) {
154154 parent ::__construct ($ client );
@@ -232,7 +232,7 @@ public function getName(): string
232232 /**
233233 * @return string query with extra params
234234 */
235- private function buildQuery (string $ url , int $ limit , string $ locale = null , string $ country = null ): string
235+ private function buildQuery (string $ url , int $ limit , ? string $ locale = null , ? string $ country = null ): string
236236 {
237237 $ parameters = array_filter ([
238238 'country ' => $ country ,
@@ -246,7 +246,7 @@ private function buildQuery(string $url, int $limit, string $locale = null, stri
246246 return $ url .$ separator .http_build_query ($ parameters );
247247 }
248248
249- private function fetchUrl (string $ url , int $ limit , string $ locale = null , string $ country = null ): AddressCollection
249+ private function fetchUrl (string $ url , int $ limit , ? string $ locale = null , ? string $ country = null ): AddressCollection
250250 {
251251 $ url = $ this ->buildQuery ($ url , $ limit , $ locale , $ country );
252252 $ content = $ this ->getUrlContents ($ url );
0 commit comments