src/Services/Geocoding/GeocoderProvider.php
public function getGeocodedData($request)
    {
        if (is_string($request)) {
            $geocoderRequest = new GeocoderRequest();
            $geocoderRequest->setAddress($request);
        } elseif ($request instanceof GeocoderRequest) {
            $geocoderRequest = $request;
        } else {
            throw GeocodingException::invalidGeocoderProviderRequestArguments();
        }

        if (!$geocoderRequest->isValid()) {
            throw GeocodingException::invalidGeocoderProviderRequest();
        }

        $url = $this->generateUrl($geocoderRequest);
        $response = $this->getAdapter()->getContent($url);

        if ($response === null) {
            throw GeocodingException::invalidServiceResult();
        }

        $normalizedResponse = $this->parse($response);

        return $this->buildGeocoderResponse($normalizedResponse);
    }
public function getGeocodedData($request)
    {
        if (is_string($request)) {
            $geocoderRequest = new GeocoderRequest();
            $geocoderRequest->setAddress($request);
        } elseif ($request instanceof GeocoderRequest) {
            $geocoderRequest = $request;
        } else {
            throw GeocodingException::invalidGeocoderProviderRequestArguments();
        }

        if (!$geocoderRequest->isValid()) {
            throw GeocodingException::invalidGeocoderProviderRequest();
        }

        $url = $this->generateUrl($geocoderRequest);
        $response = $this->getAdapter()->getContent($url);

        if ($response === null) {
            throw GeocodingException::invalidServiceResult();
        }

        $normalizedResponse = $this->parse($response);

        return $this->buildGeocoderResponse($normalizedResponse);
    }
{@inheritdoc}

@throws \Ivory\GoogleMap\Exception\GeocodingException If the request is not valid.