Can you move `$traits = $class->getTraits()` to the `foreach` directly?