Skip to content

Commit

Permalink
improve factory methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Jan 21, 2015
1 parent 3d3e40a commit b0283ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/AbstractCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public static function createFromString($str)
);
}
$obj = new SplTempFileObject();
$obj->fwrite((string) $str.PHP_EOL);
$obj->fwrite(rtrim($str)."\n");

return static::createFromFileObject($obj);
}
Expand All @@ -242,8 +242,9 @@ protected function newInstance($class_name, $open_mode)
$csv = new $class_name($this->path, $open_mode);
$csv->delimiter = $this->delimiter;
$csv->enclosure = $this->enclosure;
$csv->escape = $this->escape;
$csv->escape = $this->escape;
$csv->encodingFrom = $this->encodingFrom;
$csv->bom = $this->bom;

return $csv;
}
Expand Down

0 comments on commit b0283ee

Please sign in to comment.