original_string: public function hasEvent($name)
      {
          foreach ($this->_events as $event) {
              if ($event->getName() === $name) {
                  return true;
              }
          }
  
          return false;
      }
code: public function hasEvent($name)
      {
          foreach ($this->_events as $event) {
              if ($event->getName() === $name) {
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public function hasEvent ( $ name ) { foreach ( $ this -> _events as $ event ) { if ( $ event -> getName ( ) === $ name ) { return true ; } } return false ; }
docstring: Checks if an event is in the list.
  
  @param string $name Event name.
  @return bool
docstring_tokens: Checks if an event is in the list .