mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Make condition easier to read; no change in logic
This commit is contained in:
@@ -731,9 +731,8 @@ class Csv {
|
||||
} else {
|
||||
$enclosed = false;
|
||||
}
|
||||
|
||||
// end of field/row/csv
|
||||
} elseif (($ch === $this->delimiter || $ch == "\n" || $ch == "\r" || $ch === false) && !$enclosed) {
|
||||
} elseif ((in_array($ch, [$this->delimiter, "\n", "\r", false], true)) && !$enclosed) {
|
||||
$key = !empty($head[$col]) ? $head[$col] : $col;
|
||||
$row[$key] = $was_enclosed ? $current : trim($current);
|
||||
$current = '';
|
||||
|
||||
Reference in New Issue
Block a user