public function class_uses_deep($class)
    {
        $traits = [];
        do {
            $traits = array_merge($traits, class_uses($class, false));
        } while ($class = get_parent_class($class));
        foreach ($traits as $trait) {
            $traits = array_merge($traits, class_uses($trait, false));
        }
        return array_unique($traits);
    }