protected function resolveGroupAndWhen($collections)
    {
        if (count(RouteCollector::getGroups())) {
            $collections = $this->resolveGroupCollections($collections);
        }

        if (isset($collections['WHEN'])) {
            $collections = $this->resolveWhenCollections($collections['WHEN']);
        }

        if (count($groups = RouteCollector::getGroups())) {
            $collections = $this->resolveGroupCollections($groups);
        }

        return $collections;
    }
protected function resolveGroupAndWhen($collections)
    {
        if (count(RouteCollector::getGroups())) {
            $collections = $this->resolveGroupCollections($collections);
        }

        if (isset($collections['WHEN'])) {
            $collections = $this->resolveWhenCollections($collections['WHEN']);
        }

        if (count($groups = RouteCollector::getGroups())) {
            $collections = $this->resolveGroupCollections($groups);
        }

        return $collections;
    }
protected function resolveGroupAndWhen ( $ collections ) { if ( count ( RouteCollector :: getGroups ( ) ) ) { $ collections = $ this -> resolveGroupCollections ( $ collections ) ; } if ( isset ( $ collections [ 'WHEN' ] ) ) { $ collections = $ this -> resolveWhenCollections ( $ collections [ 'WHEN' ] ) ; } if ( count ( $ groups = RouteCollector :: getGroups ( ) ) ) { $ collections = $ this -> resolveGroupCollections ( $ groups ) ; } return $ collections ; }
resolve group and when collections

@param array $collections
@return array
resolve group and when collections