original_string: public function useTrait(\ReflectionClass $trait)
      {
          $alias = 'trait' . ($this->_traitsIdx++);
          $alias .= '_' . str_replace('\\', '__', $trait->getName());
  
          $alias = 'Trait_' . substr(md5($alias), 0, 10) . '_' .$trait->getShortName();
  
          $this->addUse($trait->getName(), $alias);
          $this->addTrait($alias);
  
          foreach ($trait->getMethods() as $method) {
              if ($method->isAbstract()) {
                  continue;
              }
              $this->registerTraitMethod($alias, $method);
          }
  
          return $this;
      }
code: public function useTrait(\ReflectionClass $trait)
      {
          $alias = 'trait' . ($this->_traitsIdx++);
          $alias .= '_' . str_replace('\\', '__', $trait->getName());
  
          $alias = 'Trait_' . substr(md5($alias), 0, 10) . '_' .$trait->getShortName();
  
          $this->addUse($trait->getName(), $alias);
          $this->addTrait($alias);
  
          foreach ($trait->getMethods() as $method) {
              if ($method->isAbstract()) {
                  continue;
              }
              $this->registerTraitMethod($alias, $method);
          }
  
          return $this;
      }
code_tokens: public function useTrait ( \ ReflectionClass $ trait ) { $ alias = 'trait' . ( $ this -> _traitsIdx ++ ) ; $ alias .= '_' . str_replace ( '\\' , '__' , $ trait -> getName ( ) ) ; $ alias = 'Trait_' . substr ( md5 ( $ alias ) , 0 , 10 ) . '_' . $ trait -> getShortName ( ) ; $ this -> addUse ( $ trait -> getName ( ) , $ alias ) ; $ this -> addTrait ( $ alias ) ; foreach ( $ trait -> getMethods ( ) as $ method ) { if ( $ method -> isAbstract ( ) ) { continue ; } $ this -> registerTraitMethod ( $ alias , $ method ) ; } return $ this ; }
docstring: Use a trait and save all methods so in case
  a second trait will overwrite any
  
  @param \ReflectionClass $trait
  
  @return $this
docstring_tokens: Use a trait and save all methods so in case a second trait will overwrite any