src/Geolocation.php
private function buildQuery(string $url, string $apiKey, string $locale = null, string $region = null) : string
    {
        if (null !== $apiKey) {
            $url = sprintf('%s&key=%s', $url, $apiKey);
        }
        if (null !== $locale) {
            $url = sprintf('%s&language=%s', $url, $locale);
        }
        if (null !== $region) {
            $url = sprintf('%s&region=%s', $url, $region);
        }

        return $url;
    }
private function buildQuery(string $url, string $apiKey, string $locale = null, string $region = null) : string
    {
        if (null !== $apiKey) {
            $url = sprintf('%s&key=%s', $url, $apiKey);
        }
        if (null !== $locale) {
            $url = sprintf('%s&language=%s', $url, $locale);
        }
        if (null !== $region) {
            $url = sprintf('%s&region=%s', $url, $region);
        }

        return $url;
    }
private function buildQuery ( string $ url , string $ apiKey , string $ locale = null , string $ region = null ) : string { if ( null !== $ apiKey ) { $ url = sprintf ( '%s&key=%s' , $ url , $ apiKey ) ; } if ( null !== $ locale ) { $ url = sprintf ( '%s&language=%s' , $ url , $ locale ) ; } if ( null !== $ region ) { $ url = sprintf ( '%s&region=%s' , $ url , $ region ) ; } return $ url ; }
build query with extra params

@param string $url
@param string $locale
@param string $region
@param string $apiKey

@return string
build query with extra params