src/Services/Directions/Directions.php
protected function buildDirectionsLegs(array $directionsLegs)
    {
        $results =  array();
        foreach ($directionsLegs as $directionsLeg) {
            $results[] = $this->buildDirectionsLeg($directionsLeg);
        }

        return $results;
    }
protected function buildDirectionsLegs(array $directionsLegs)
    {
        $results =  array();
        foreach ($directionsLegs as $directionsLeg) {
            $results[] = $this->buildDirectionsLeg($directionsLeg);
        }

        return $results;
    }
Builds the directions legs according to the normalized directions API legs.

@param array $directionsLegs The normalized directions legs.

@return array The builded directions legs.