original_string: public function replaceInFile($old, $new, $append = 0)
      {
          $contents = $this->previous;
          $replaceWith = preg_replace("~$old\n?~", "$new\n", $contents);
  
          file_put_contents($this->getPath(), $replaceWith, $append);
  
          return $this;
      }
code: public function replaceInFile($old, $new, $append = 0)
      {
          $contents = $this->previous;
          $replaceWith = preg_replace("~$old\n?~", "$new\n", $contents);
  
          file_put_contents($this->getPath(), $replaceWith, $append);
  
          return $this;
      }
code_tokens: public function replaceInFile ( $ old , $ new , $ append = 0 ) { $ contents = $ this -> previous ; $ replaceWith = preg_replace ( "~$old\n?~" , "$new\n" , $ contents ) ; file_put_contents ( $ this -> getPath ( ) , $ replaceWith , $ append ) ; return $ this ; }
docstring: Replace a part of the .env file.
  
  @param string $old
  @param string $new
  @param int    $append
  
  @return \Sven\FlexEnv\Env
docstring_tokens: Replace a part of the . env file .