original_string: public function nextItem()
      {
          if ($this->batch === null) {
              $this->batch = [];
          }
          
          //If no items in batch, and we have a resumptionToken or need to make initial request...
          if (count($this->batch) == 0 && ($this->resumptionToken or $this->numRequests == 0)) {
              $this->retrieveBatch();
          }
  
          //if still items in current batch, return one
          if (count($this->batch) > 0) {
              $this->numProcessed++;
  
              $item = array_shift($this->batch);
              $this->currItem = clone $item;
          } else {
              $this->currItem = false;
          }
  
          return $this->currItem;
      }
code: public function nextItem()
      {
          if ($this->batch === null) {
              $this->batch = [];
          }
          
          //If no items in batch, and we have a resumptionToken or need to make initial request...
          if (count($this->batch) == 0 && ($this->resumptionToken or $this->numRequests == 0)) {
              $this->retrieveBatch();
          }
  
          //if still items in current batch, return one
          if (count($this->batch) > 0) {
              $this->numProcessed++;
  
              $item = array_shift($this->batch);
              $this->currItem = clone $item;
          } else {
              $this->currItem = false;
          }
  
          return $this->currItem;
      }
code_tokens: public function nextItem ( ) { if ( $ this -> batch === null ) { $ this -> batch = [ ] ; } //If no items in batch, and we have a resumptionToken or need to make initial request... if ( count ( $ this -> batch ) == 0 && ( $ this -> resumptionToken or $ this -> numRequests == 0 ) ) { $ this -> retrieveBatch ( ) ; } //if still items in current batch, return one if ( count ( $ this -> batch ) > 0 ) { $ this -> numProcessed ++ ; $ item = array_shift ( $ this -> batch ) ; $ this -> currItem = clone $ item ; } else { $ this -> currItem = false ; } return $ this -> currItem ; }
docstring: Get the next item
  
  Return an item from the currently-retrieved batch, get next batch and
  return first record from it, or return false if no more records
  
  @return \SimpleXMLElement|bool
docstring_tokens: Get the next item