/**
  * @param string $contents
  * @param string $path
  */
 public function __construct($contents, $path = null)
 {
     $lines = array();
     if (!empty($contents)) {
         $lines = explode("\n", rtrim($contents));
     }
     $this->buffer = PatchBuilderBuffer::createWithContents($lines);
     $this->path = $path;
 }