original_string: public function addEventListener($eventName, array $listeners)
      {
          if (!array_key_exists($eventName, $this->options['events'])) {
              $this->options['events'][$eventName] = [
                  'object' =>BaseEvent::class,
                  'listeners' => $listeners,
              ];
          }
  
          $this->options['events'][$eventName]['listeners'] = array_merge(
              $this->options['events'][$eventName]['listeners'],
              $listeners
          );
  
          return $this;
      }
code: public function addEventListener($eventName, array $listeners)
      {
          if (!array_key_exists($eventName, $this->options['events'])) {
              $this->options['events'][$eventName] = [
                  'object' =>BaseEvent::class,
                  'listeners' => $listeners,
              ];
          }
  
          $this->options['events'][$eventName]['listeners'] = array_merge(
              $this->options['events'][$eventName]['listeners'],
              $listeners
          );
  
          return $this;
      }
code_tokens: public function addEventListener ( $ eventName , array $ listeners ) { if ( ! array_key_exists ( $ eventName , $ this -> options [ 'events' ] ) ) { $ this -> options [ 'events' ] [ $ eventName ] = [ 'object' => BaseEvent :: class , 'listeners' => $ listeners , ] ; } $ this -> options [ 'events' ] [ $ eventName ] [ 'listeners' ] = array_merge ( $ this -> options [ 'events' ] [ $ eventName ] [ 'listeners' ] , $ listeners ) ; return $ this ; }
docstring: dynamically add new listener or listeners for given event name
  listeners are added at end of the list
  
  @param string $eventName
  @param array $listeners
  @return $this
docstring_tokens: dynamically add new listener or listeners for given event name listeners are added at end of the list