src/Services/DistanceMatrix/DistanceMatrixRequest.php
public function addDestination()
    {
        $args = func_get_args();

        if (isset($args[0]) && is_string($args[0])) {
            $this->destinations[] = $args[0];
        } elseif (isset($args[0]) && ($args[0] instanceof Coordinate)) {
            $this->destinations[] = $args[0];
        } elseif ((isset($args[0]) && is_numeric($args[0])) && (isset($args[1]) && is_numeric($args[1]))) {
            $destination = new Coordinate();
            $destination->setLatitude($args[0]);
            $destination->setLongitude($args[1]);

            if (isset($args[2]) && is_bool($args[2])) {
                $destination->setNoWrap($args[2]);
            }

            $this->destinations[] = $destination;
        } else {
            throw DistanceMatrixException::invalidDistanceMatrixRequestDestination();
        }
    }
public function addDestination()
    {
        $args = func_get_args();

        if (isset($args[0]) && is_string($args[0])) {
            $this->destinations[] = $args[0];
        } elseif (isset($args[0]) && ($args[0] instanceof Coordinate)) {
            $this->destinations[] = $args[0];
        } elseif ((isset($args[0]) && is_numeric($args[0])) && (isset($args[1]) && is_numeric($args[1]))) {
            $destination = new Coordinate();
            $destination->setLatitude($args[0]);
            $destination->setLongitude($args[1]);

            if (isset($args[2]) && is_bool($args[2])) {
                $destination->setNoWrap($args[2]);
            }

            $this->destinations[] = $destination;
        } else {
            throw DistanceMatrixException::invalidDistanceMatrixRequestDestination();
        }
    }
Adds a destination to the request.

Available prototypes:
- function addDestination(string $destination)
- function addDestination(Ivory\GoogleMap\Base\Coordinate $destination)
- function addDestination(double $latitude, double $longitude, boolean $noWrap)

@throws \Ivory\GoogleMap\Exception\DistanceMatrixException If the destination is not valid (prototypes).