Routing/MenuComposer.php
private function resolveOrder($routes, $order){
        if (isset($routes[$order])) {
            return $this->resolveOrder($routes, $order + 1);
        } else {
            return $order;
        }
    }
private function resolveOrder($routes, $order){
        if (isset($routes[$order])) {
            return $this->resolveOrder($routes, $order + 1);
        } else {
            return $order;
        }
    }
private function resolveOrder ( $ routes , $ order ) { if ( isset ( $ routes [ $ order ] ) ) { return $ this -> resolveOrder ( $ routes , $ order + 1 ) ; } else { return $ order ; } }
recursive function to resolve the order of a array of routes.
If the order chosen in routing.yml is already in used, find the
first next order available.

@param array $routes the routes previously added
@param int $order
@return int
recursive function to resolve the order of a array of routes . If the order chosen in routing . yml is already in used find the first next order available .