original_string: public function addInterface($interface, $extends = [])
      {
          $interfaceId = $this->registerInterface($interface);
          if (!empty($extends)) {
              $interfaceIds = [];
              foreach ($extends as $name) {
                  $interfaceIds[] = $this->registerInterface($name);
              }
              $this->interfaceExtends[$interfaceId] = $interfaceIds;
          }
      }
code: public function addInterface($interface, $extends = [])
      {
          $interfaceId = $this->registerInterface($interface);
          if (!empty($extends)) {
              $interfaceIds = [];
              foreach ($extends as $name) {
                  $interfaceIds[] = $this->registerInterface($name);
              }
              $this->interfaceExtends[$interfaceId] = $interfaceIds;
          }
      }
code_tokens: public function addInterface ( $ interface , $ extends = [ ] ) { $ interfaceId = $ this -> registerInterface ( $ interface ) ; if ( ! empty ( $ extends ) ) { $ interfaceIds = [ ] ; foreach ( $ extends as $ name ) { $ interfaceIds [ ] = $ this -> registerInterface ( $ name ) ; } $ this -> interfaceExtends [ $ interfaceId ] = $ interfaceIds ; } }
docstring: add interface to hierarchy tree
  
  @param string $interface
  @param array $extends
  @return self
docstring_tokens: add interface to hierarchy tree