public function setTravelMode($travelMode)
    {
        if (!in_array($travelMode, TravelMode::getTravelModes())) {
            throw DirectionsException::invalidDirectionsStepTravelMode();
        }

        $this->travelMode = $travelMode;
    }
public function setTravelMode($travelMode)
    {
        if (!in_array($travelMode, TravelMode::getTravelModes())) {
            throw DirectionsException::invalidDirectionsStepTravelMode();
        }

        $this->travelMode = $travelMode;
    }
public function setTravelMode ( $ travelMode ) { if ( ! in_array ( $ travelMode , TravelMode :: getTravelModes ( ) ) ) { throw DirectionsException :: invalidDirectionsStepTravelMode ( ) ; } $ this -> travelMode = $ travelMode ; }
Sets the step travel mode.

@param string $travelMode The step travel mode.

@throws \Ivory\GoogleMap\Exception\DirectionsException If the travel mode is not valid.
Sets the step travel mode .