original_string: protected function getNewFeedItems(array $new, array $old)
      {
          $map = array();
          $getKey = function($item) {
              return $item->getPermalink();
          };
          $logger = $this->getLogger();
          foreach ($new as $item) {
              $key = $getKey($item);
              $logger->debug('New: ' . $key);
              $map[$key] = $item;
          }
          foreach ($old as $item) {
              $key = $getKey($item);
              $logger->debug('Old: ' . $key);
              unset($map[$key]);
          }
          $logger->debug('Diff: ' . implode(' ', array_keys($map)));
          return array_values($map);
      }
code: protected function getNewFeedItems(array $new, array $old)
      {
          $map = array();
          $getKey = function($item) {
              return $item->getPermalink();
          };
          $logger = $this->getLogger();
          foreach ($new as $item) {
              $key = $getKey($item);
              $logger->debug('New: ' . $key);
              $map[$key] = $item;
          }
          foreach ($old as $item) {
              $key = $getKey($item);
              $logger->debug('Old: ' . $key);
              unset($map[$key]);
          }
          $logger->debug('Diff: ' . implode(' ', array_keys($map)));
          return array_values($map);
      }
code_tokens: protected function getNewFeedItems ( array $ new , array $ old ) { $ map = array ( ) ; $ getKey = function ( $ item ) { return $ item -> getPermalink ( ) ; } ; $ logger = $ this -> getLogger ( ) ; foreach ( $ new as $ item ) { $ key = $ getKey ( $ item ) ; $ logger -> debug ( 'New: ' . $ key ) ; $ map [ $ key ] = $ item ; } foreach ( $ old as $ item ) { $ key = $ getKey ( $ item ) ; $ logger -> debug ( 'Old: ' . $ key ) ; unset ( $ map [ $ key ] ) ; } $ logger -> debug ( 'Diff: ' . implode ( ' ' , array_keys ( $ map ) ) ) ; return array_values ( $ map ) ; }
docstring: Locates new items in a feed given newer and older lists of items from
  the feed.
  
  @param \Zend\Feed\Reader\Entry\EntryInterface[] $new
  @param \Zend\Feed\Reader\Entry\EntryInterface[] $old
docstring_tokens: Locates new items in a feed given newer and older lists of items from the feed .