original_string: public function addGenerator()
      {
          if ($this->version == Feed::ATOM)
              $this->setChannelElement('atom:generator', 'FeedWriter', array('uri' => 'https://github.com/mibe/FeedWriter'));
          else if ($this->version == Feed::RSS2)
              $this->setChannelElement('generator', 'FeedWriter');
          else
              throw new InvalidOperationException('The generator element is not supported in RSS1 feeds.');
  
          return $this;
      }
code: public function addGenerator()
      {
          if ($this->version == Feed::ATOM)
              $this->setChannelElement('atom:generator', 'FeedWriter', array('uri' => 'https://github.com/mibe/FeedWriter'));
          else if ($this->version == Feed::RSS2)
              $this->setChannelElement('generator', 'FeedWriter');
          else
              throw new InvalidOperationException('The generator element is not supported in RSS1 feeds.');
  
          return $this;
      }
code_tokens: public function addGenerator ( ) { if ( $ this -> version == Feed :: ATOM ) $ this -> setChannelElement ( 'atom:generator' , 'FeedWriter' , array ( 'uri' => 'https://github.com/mibe/FeedWriter' ) ) ; else if ( $ this -> version == Feed :: RSS2 ) $ this -> setChannelElement ( 'generator' , 'FeedWriter' ) ; else throw new InvalidOperationException ( 'The generator element is not supported in RSS1 feeds.' ) ; return $ this ; }
docstring: Add a channel element indicating the program used to generate the feed.
  
  @return   self
  @throws   InvalidOperationException if this method is called on an RSS1 feed.
docstring_tokens: Add a channel element indicating the program used to generate the feed .