public static function flatAndSortAdvices(array $advices): array
    {
        $flattenAdvices = [];
        foreach ($advices as $type => $typedAdvices) {
            foreach ($typedAdvices as $name => $concreteAdvices) {
                if (is_array($concreteAdvices)) {
                    $flattenAdvices[$type][$name] = array_keys(self::sortAdvices($concreteAdvices));
                } else {
                    $flattenAdvices[$type][$name] = $concreteAdvices;
                }
            }
        }

        return $flattenAdvices;
    }
public static function flatAndSortAdvices(array $advices): array
    {
        $flattenAdvices = [];
        foreach ($advices as $type => $typedAdvices) {
            foreach ($typedAdvices as $name => $concreteAdvices) {
                if (is_array($concreteAdvices)) {
                    $flattenAdvices[$type][$name] = array_keys(self::sortAdvices($concreteAdvices));
                } else {
                    $flattenAdvices[$type][$name] = $concreteAdvices;
                }
            }
        }

        return $flattenAdvices;
    }
public static function flatAndSortAdvices ( array $ advices ) : array { $ flattenAdvices = [ ] ; foreach ( $ advices as $ type => $ typedAdvices ) { foreach ( $ typedAdvices as $ name => $ concreteAdvices ) { if ( is_array ( $ concreteAdvices ) ) { $ flattenAdvices [ $ type ] [ $ name ] = array_keys ( self :: sortAdvices ( $ concreteAdvices ) ) ; } else { $ flattenAdvices [ $ type ] [ $ name ] = $ concreteAdvices ; } } } return $ flattenAdvices ; }
Replace concrete advices with list of ids

@param Advice[][][] $advices List of advices
Replace concrete advices with list of ids