original_string: public function openToFile($outputFilePath)
      {
          $this->outputFilePath = $outputFilePath;
  
          $this->filePointer = $this->globalFunctionsHelper->fopen($this->outputFilePath, 'wb+');
          $this->throwIfFilePointerIsNotAvailable();
  
          $this->openWriter();
          $this->isWriterOpened = true;
  
          return $this;
      }
code: public function openToFile($outputFilePath)
      {
          $this->outputFilePath = $outputFilePath;
  
          $this->filePointer = $this->globalFunctionsHelper->fopen($this->outputFilePath, 'wb+');
          $this->throwIfFilePointerIsNotAvailable();
  
          $this->openWriter();
          $this->isWriterOpened = true;
  
          return $this;
      }
code_tokens: public function openToFile ( $ outputFilePath ) { $ this -> outputFilePath = $ outputFilePath ; $ this -> filePointer = $ this -> globalFunctionsHelper -> fopen ( $ this -> outputFilePath , 'wb+' ) ; $ this -> throwIfFilePointerIsNotAvailable ( ) ; $ this -> openWriter ( ) ; $ this -> isWriterOpened = true ; return $ this ; }
docstring: Inits the writer and opens it to accept data.
  By using this method, the data will be written to a file.
  
  @api
  @param  string $outputFilePath Path of the output file that will contain the data
  @return AbstractWriter
  @throws \Box\Spout\Common\Exception\IOException If the writer cannot be opened or if the given path is not writable
docstring_tokens: Inits the writer and opens it to accept data . By using this method the data will be written to a file .