public function traits() {
        $traits = $this->reflection()->getTraitNames();
        $parent = get_parent_class($this->_class);

        while ($parent) {
            $traits = array_merge($traits, class_uses($parent));
            $parent = get_parent_class($parent);
        }

        return array_values($traits);
    }
public function traits() {
        $traits = $this->reflection()->getTraitNames();
        $parent = get_parent_class($this->_class);

        while ($parent) {
            $traits = array_merge($traits, class_uses($parent));
            $parent = get_parent_class($parent);
        }

        return array_values($traits);
    }
public function traits ( ) { $ traits = $ this -> reflection ( ) -> getTraitNames ( ) ; $ parent = get_parent_class ( $ this -> _class ) ; while ( $ parent ) { $ traits = array_merge ( $ traits , class_uses ( $ parent ) ) ; $ parent = get_parent_class ( $ parent ) ; } return array_values ( $ traits ) ; }
Return an array of traits that the class implements.

@return string[]
Return an array of traits that the class implements .