Thanks, forgot about that. I will add an if (method_exists($reflClass, 'getTraits'))