Skip to content

Commit

Permalink
Now passing checks
Browse files Browse the repository at this point in the history
  • Loading branch information
on2 committed Oct 8, 2019
1 parent 749d5ca commit daaf201
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/Polyfill/EmptyEscapeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ private static function filterDocument($document)
private static function extractRecord(): array
{
$record = [];
self::$line = self::$document->fgets();
if (self::$line === false) {
if (false === (self::$line = self::$document->fgets())) {
return [null];
}
do {
Expand Down
6 changes: 3 additions & 3 deletions tests/Polyfill/EmptyEscapeParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ public function testReadingOnlyStream()
EOF;

$expected = [
['1','2'],
[null]
['1', '2'],
[null],
];

$path = sys_get_temp_dir() . '/test.csv';
$path = sys_get_temp_dir().'/test.csv';
file_put_contents($path, $source);

$stream = Stream::createFromPath($path);
Expand Down

0 comments on commit daaf201

Please sign in to comment.