original_string: public function addListener($name, $listener, $priority = 0)
      {
          if (! isset($this->listeners[$name])) $this->listeners[$name] = [];
          $this->listeners[$name][$priority][] = $listener;
      }
code: public function addListener($name, $listener, $priority = 0)
      {
          if (! isset($this->listeners[$name])) $this->listeners[$name] = [];
          $this->listeners[$name][$priority][] = $listener;
      }
code_tokens: public function addListener ( $ name , $ listener , $ priority = 0 ) { if ( ! isset ( $ this -> listeners [ $ name ] ) ) $ this -> listeners [ $ name ] = [ ] ; $ this -> listeners [ $ name ] [ $ priority ] [ ] = $ listener ; }
docstring: add event listener
  
  @param   string  $name
  @param   mixed   $listener
  @param   int     $priority
docstring_tokens: add event listener