original_string: public function addItem(Item $feedItem)
      {
          if ($feedItem->getVersion() != $this->version)
          {
              $msg = sprintf('Feed type mismatch: This instance can handle %s feeds only, but item for %s feeds given.', $this->version, $feedItem->getVersion());
              throw new \InvalidArgumentException($msg);
          }
  
          $this->items[] = $feedItem;
  
          return $this;
      }
code: public function addItem(Item $feedItem)
      {
          if ($feedItem->getVersion() != $this->version)
          {
              $msg = sprintf('Feed type mismatch: This instance can handle %s feeds only, but item for %s feeds given.', $this->version, $feedItem->getVersion());
              throw new \InvalidArgumentException($msg);
          }
  
          $this->items[] = $feedItem;
  
          return $this;
      }
code_tokens: public function addItem ( Item $ feedItem ) { if ( $ feedItem -> getVersion ( ) != $ this -> version ) { $ msg = sprintf ( 'Feed type mismatch: This instance can handle %s feeds only, but item for %s feeds given.' , $ this -> version , $ feedItem -> getVersion ( ) ) ; throw new \ InvalidArgumentException ( $ msg ) ; } $ this -> items [ ] = $ feedItem ; return $ this ; }
docstring: Add a FeedItem to the main class
  
  @access   public
  @param    Item   $feedItem instance of Item class
  @return   self
  @throws   \InvalidArgumentException if the given item version mismatches.
docstring_tokens: Add a FeedItem to the main class