src/Services/DistanceMatrix/DistanceMatrix.php
protected function buildDistanceMatrixResponse(\stdClass $distanceMatrixResponse)
    {
        $status = $distanceMatrixResponse->status;
        $destinations = $distanceMatrixResponse->destination_addresses;
        $origins = $distanceMatrixResponse->origin_addresses;
        $rows = $this->buildDistanceMatrixRows($distanceMatrixResponse->rows);

        return new DistanceMatrixResponse($status, $origins, $destinations, $rows);
    }
protected function buildDistanceMatrixResponse(\stdClass $distanceMatrixResponse)
    {
        $status = $distanceMatrixResponse->status;
        $destinations = $distanceMatrixResponse->destination_addresses;
        $origins = $distanceMatrixResponse->origin_addresses;
        $rows = $this->buildDistanceMatrixRows($distanceMatrixResponse->rows);

        return new DistanceMatrixResponse($status, $origins, $destinations, $rows);
    }
Builds the distance matrix response according to the normalized distance matrix API results.

@param \stdClass $distanceMatrixResponse The normalized distance matrix response.

@return \Ivory\GoogleMap\Services\DistanceMatrix\DistanceMatrixResponse The built distance matrix response.