private function recursiveGetTraitNames(ReflectionClass $class, array &$trait_names)
    {
        $trait_names = array_merge($trait_names, $class->getTraitNames());

        if ($class->getParentClass()) {
            $this->recursiveGetTraitNames($class->getParentClass(), $trait_names);
        }
    }
private function recursiveGetTraitNames(ReflectionClass $class, array &$trait_names)
    {
        $trait_names = array_merge($trait_names, $class->getTraitNames());

        if ($class->getParentClass()) {
            $this->recursiveGetTraitNames($class->getParentClass(), $trait_names);
        }
    }
private function recursiveGetTraitNames ( ReflectionClass $ class , array & $ trait_names ) { $ trait_names = array_merge ( $ trait_names , $ class -> getTraitNames ( ) ) ; if ( $ class -> getParentClass ( ) ) { $ this -> recursiveGetTraitNames ( $ class -> getParentClass ( ) , $ trait_names ) ; } }
Recursively get trait names for the given class.

@param ReflectionClass $class
@param array           $trait_names
Recursively get trait names for the given class .