Code quality: Removed superfluous brackets; should not change anything

This commit is contained in:
Fonata
2020-01-06 18:04:45 +01:00
parent 38e9fff285
commit b792a6cc7b
2 changed files with 10 additions and 1 deletions

View File

@@ -1137,7 +1137,7 @@ class Csv {
: '';
$enclosure_quoted = preg_quote($this->enclosure, '/');
$pattern = "/" . $delimiter_quoted . $enclosure_quoted . "|\n|\r/i";
if ($this->enclose_all || preg_match($pattern, $value) || (strpos($value, ' ') === 0 || substr($value, -1) == ' ')) {
if ($this->enclose_all || preg_match($pattern, $value) || strpos($value, ' ') === 0 || substr($value, -1) == ' ') {
$value = str_replace($this->enclosure, $this->enclosure . $this->enclosure, $value);
$value = $this->enclosure . $value . $this->enclosure;
}