original_string: protected function addTraitMethod($trait, $method)
      {
          if (!isset($this->_traitMethods[$method])) {
              $this->_traitMethods[$method] = [];
          } else {
              foreach ($this->_traitMethods[$method] as $prefTrait) {
                  $this->removeTraitOverride($prefTrait . '::' . $method);
              }
              $traits = implode(', ', $this->_traitMethods[$method]);
              $this->addTraitOverride($trait . '::' . $method, $traits);
          }
          $this->_traitMethods[$method][] = $trait;
      }
code: protected function addTraitMethod($trait, $method)
      {
          if (!isset($this->_traitMethods[$method])) {
              $this->_traitMethods[$method] = [];
          } else {
              foreach ($this->_traitMethods[$method] as $prefTrait) {
                  $this->removeTraitOverride($prefTrait . '::' . $method);
              }
              $traits = implode(', ', $this->_traitMethods[$method]);
              $this->addTraitOverride($trait . '::' . $method, $traits);
          }
          $this->_traitMethods[$method][] = $trait;
      }
code_tokens: protected function addTraitMethod ( $ trait , $ method ) { if ( ! isset ( $ this -> _traitMethods [ $ method ] ) ) { $ this -> _traitMethods [ $ method ] = [ ] ; } else { foreach ( $ this -> _traitMethods [ $ method ] as $ prefTrait ) { $ this -> removeTraitOverride ( $ prefTrait . '::' . $ method ) ; } $ traits = implode ( ', ' , $ this -> _traitMethods [ $ method ] ) ; $ this -> addTraitOverride ( $ trait . '::' . $ method , $ traits ) ; } $ this -> _traitMethods [ $ method ] [ ] = $ trait ; }
docstring: Register trait method
  this will overwrite all previously registered methods
  
  @param string $trait
  @param string $method
  
  @return void
docstring_tokens: Register trait method this will overwrite all previously registered methods