original_string: protected function addRowToWriter(array $dataRow, $style)
      {
          $wasWriteSuccessful = $this->globalFunctionsHelper->fputcsv($this->filePointer, $dataRow, $this->fieldDelimiter, $this->fieldEnclosure);
          if ($wasWriteSuccessful === false) {
              throw new IOException('Unable to write data');
          }
  
          $this->lastWrittenRowIndex++;
          if ($this->lastWrittenRowIndex % self::FLUSH_THRESHOLD === 0) {
              $this->globalFunctionsHelper->fflush($this->filePointer);
          }
      }
code: protected function addRowToWriter(array $dataRow, $style)
      {
          $wasWriteSuccessful = $this->globalFunctionsHelper->fputcsv($this->filePointer, $dataRow, $this->fieldDelimiter, $this->fieldEnclosure);
          if ($wasWriteSuccessful === false) {
              throw new IOException('Unable to write data');
          }
  
          $this->lastWrittenRowIndex++;
          if ($this->lastWrittenRowIndex % self::FLUSH_THRESHOLD === 0) {
              $this->globalFunctionsHelper->fflush($this->filePointer);
          }
      }
code_tokens: protected function addRowToWriter ( array $ dataRow , $ style ) { $ wasWriteSuccessful = $ this -> globalFunctionsHelper -> fputcsv ( $ this -> filePointer , $ dataRow , $ this -> fieldDelimiter , $ this -> fieldEnclosure ) ; if ( $ wasWriteSuccessful === false ) { throw new IOException ( 'Unable to write data' ) ; } $ this -> lastWrittenRowIndex ++ ; if ( $ this -> lastWrittenRowIndex % self :: FLUSH_THRESHOLD === 0 ) { $ this -> globalFunctionsHelper -> fflush ( $ this -> filePointer ) ; } }
docstring: Adds data to the currently opened writer.
  
  @param  array $dataRow Array containing data to be written.
  Example $dataRow = ['data1', 1234, null, '', 'data5'];
  @param \Box\Spout\Writer\Style\Style $style Ignored here since CSV does not support styling.
  @return void
  @throws \Box\Spout\Common\Exception\IOException If unable to write data
docstring_tokens: Adds data to the currently opened writer .