original_string: public function addEventListener(string $name, callable $listener): self
      {
          if (!isset($this->internalEventListenersData[$name])) {
              $this->internalEventListenersData[$name] = [];
          }
          $this->internalEventListenersData[$name][] = $listener;
          return $this;
      }
code: public function addEventListener(string $name, callable $listener): self
      {
          if (!isset($this->internalEventListenersData[$name])) {
              $this->internalEventListenersData[$name] = [];
          }
          $this->internalEventListenersData[$name][] = $listener;
          return $this;
      }
code_tokens: public function addEventListener ( string $ name , callable $ listener ) : self { if ( ! isset ( $ this -> internalEventListenersData [ $ name ] ) ) { $ this -> internalEventListenersData [ $ name ] = [ ] ; } $ this -> internalEventListenersData [ $ name ] [ ] = $ listener ; return $ this ; }
docstring: Registers a new event listener.
  
  @param string $name The name of the event.
  @param callable $listener A listener callback.
  @return self Returns a reference to itself.
docstring_tokens: Registers a new event listener .