Skip to content

Commit db50c60

Browse files
committed
Csv::Parser removed processor
1 parent aa41535 commit db50c60

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Component/Csv/Reader/CsvParser.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
use Misery\Component\Common\Processor\ProcessorAwareTrait;
99
use Misery\Component\Csv\Exception\InvalidCsvElementSizeException;
1010

11-
class CsvParser implements CsvInterface, CursorInterface, ProcessorAwareInterface
11+
class CsvParser implements CsvInterface, CursorInterface
1212
{
13-
use ProcessorAwareTrait;
14-
1513
public const DELIMITER = ';';
1614
public const ENCLOSURE = '"';
1715
public const ESCAPE = '\\';
@@ -36,7 +34,6 @@ public function __construct(
3634
\SplFileObject::DROP_NEW_LINE
3735
);
3836
$file->setCsvControl($delimiter, $enclosure, $escapeChar);
39-
$this->processor = new NullDataProcessor();
4037

4138
$this->setHeaders();
4239
}
@@ -102,11 +99,11 @@ public function current()
10299

103100
// here we need to use the filter
104101
$row = @array_combine($this->headers, $current);
105-
if (null === $row) {
102+
if (false === $row || null === $row) {
106103
throw new InvalidCsvElementSizeException($this->file->getFilename(), $this->key());
107104
}
108105

109-
return $this->processor->processRow($row);
106+
return $row;
110107
}
111108

112109
/**

0 commit comments

Comments
 (0)