src/Services/DistanceMatrix/DistanceMatrixRequest.php
public function setRegion($region = null)
    {
        if ((!is_string($region) || (strlen($region) !== 2)) && ($region !== null)) {
            throw DistanceMatrixException::invalidDistanceMatrixRequestRegion();
        }

        $this->region = $region;
    }
public function setRegion($region = null)
    {
        if ((!is_string($region) || (strlen($region) !== 2)) && ($region !== null)) {
            throw DistanceMatrixException::invalidDistanceMatrixRequestRegion();
        }

        $this->region = $region;
    }
Sets the distance matrix request region.

@param string $region The distance matrix request region.

@throws \Ivory\GoogleMap\Exception\DistanceMatrixException If the region is not valid.