original_string: private function writeRows(PHPExcel_Shared_XMLWriter $objWriter, PHPExcel_Worksheet $sheet)
      {
          $number_rows_repeated = self::NUMBER_ROWS_REPEATED_MAX;
          $span_row = 0;
          $rows = $sheet->getRowIterator();
          while ($rows->valid()) {
              $number_rows_repeated--;
              $row = $rows->current();
              if ($row->getCellIterator()->valid()) {
                  if ($span_row) {
                      $objWriter->startElement('table:table-row');
                      if ($span_row > 1) {
                          $objWriter->writeAttribute('table:number-rows-repeated', $span_row);
                      }
                      $objWriter->startElement('table:table-cell');
                          $objWriter->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX);
                      $objWriter->endElement();
                      $objWriter->endElement();
                      $span_row = 0;
                  }
                  $objWriter->startElement('table:table-row');
                  $this->writeCells($objWriter, $row);
                  $objWriter->endElement();
              } else {
                  $span_row++;
              }
              $rows->next();
          }
      }
code: private function writeRows(PHPExcel_Shared_XMLWriter $objWriter, PHPExcel_Worksheet $sheet)
      {
          $number_rows_repeated = self::NUMBER_ROWS_REPEATED_MAX;
          $span_row = 0;
          $rows = $sheet->getRowIterator();
          while ($rows->valid()) {
              $number_rows_repeated--;
              $row = $rows->current();
              if ($row->getCellIterator()->valid()) {
                  if ($span_row) {
                      $objWriter->startElement('table:table-row');
                      if ($span_row > 1) {
                          $objWriter->writeAttribute('table:number-rows-repeated', $span_row);
                      }
                      $objWriter->startElement('table:table-cell');
                          $objWriter->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX);
                      $objWriter->endElement();
                      $objWriter->endElement();
                      $span_row = 0;
                  }
                  $objWriter->startElement('table:table-row');
                  $this->writeCells($objWriter, $row);
                  $objWriter->endElement();
              } else {
                  $span_row++;
              }
              $rows->next();
          }
      }
code_tokens: private function writeRows ( PHPExcel_Shared_XMLWriter $ objWriter , PHPExcel_Worksheet $ sheet ) { $ number_rows_repeated = self :: NUMBER_ROWS_REPEATED_MAX ; $ span_row = 0 ; $ rows = $ sheet -> getRowIterator ( ) ; while ( $ rows -> valid ( ) ) { $ number_rows_repeated -- ; $ row = $ rows -> current ( ) ; if ( $ row -> getCellIterator ( ) -> valid ( ) ) { if ( $ span_row ) { $ objWriter -> startElement ( 'table:table-row' ) ; if ( $ span_row > 1 ) { $ objWriter -> writeAttribute ( 'table:number-rows-repeated' , $ span_row ) ; } $ objWriter -> startElement ( 'table:table-cell' ) ; $ objWriter -> writeAttribute ( 'table:number-columns-repeated' , self :: NUMBER_COLS_REPEATED_MAX ) ; $ objWriter -> endElement ( ) ; $ objWriter -> endElement ( ) ; $ span_row = 0 ; } $ objWriter -> startElement ( 'table:table-row' ) ; $ this -> writeCells ( $ objWriter , $ row ) ; $ objWriter -> endElement ( ) ; } else { $ span_row ++ ; } $ rows -> next ( ) ; } }
docstring: Write rows of the specified sheet
  
  @param PHPExcel_Shared_XMLWriter $objWriter
  @param PHPExcel_Worksheet $sheet
docstring_tokens: Write rows of the specified sheet