protected function getUsedTraits()
    {
        $reflection = new \ReflectionClass($this);
        $properties = $reflection->getProperties();
        $traits = [];
        foreach($properties as $property) {
            $name = $property->getName();
            if(substr($name, 0, 3) == 'has') {
                $traits[] = substr($name, 3);
            }
        }
        return $traits;
    }
protected function getUsedTraits()
    {
        $reflection = new \ReflectionClass($this);
        $properties = $reflection->getProperties();
        $traits = [];
        foreach($properties as $property) {
            $name = $property->getName();
            if(substr($name, 0, 3) == 'has') {
                $traits[] = substr($name, 3);
            }
        }
        return $traits;
    }
protected function getUsedTraits ( ) { $ reflection = new \ ReflectionClass ( $ this ) ; $ properties = $ reflection -> getProperties ( ) ; $ traits = [ ] ; foreach ( $ properties as $ property ) { $ name = $ property -> getName ( ) ; if ( substr ( $ name , 0 , 3 ) == 'has' ) { $ traits [ ] = substr ( $ name , 3 ) ; } } return $ traits ; }
Gets traits used by class
@return array of used traits names
Gets traits used by class