src/Services/DistanceMatrix/DistanceMatrixRequest.php
public function setUnitSystem($unitSystem = null)
    {
        if (!in_array($unitSystem, UnitSystem::getUnitSystems()) && ($unitSystem !== null)) {
            throw DistanceMatrixException::invalidDistanceMatrixRequestUnitSystem();
        }

        $this->unitSystem = $unitSystem;
    }
public function setUnitSystem($unitSystem = null)
    {
        if (!in_array($unitSystem, UnitSystem::getUnitSystems()) && ($unitSystem !== null)) {
            throw DistanceMatrixException::invalidDistanceMatrixRequestUnitSystem();
        }

        $this->unitSystem = $unitSystem;
    }
Sets  the distance matrix request unit system.

@param string $unitSystem The distance matrix request unit system.

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