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;
    }