csv
csv copied to clipboard
move valid check to beginning of loop
I'm seeing an issue with a CSV I have where this line https://github.com/portphp/csv/blob/master/src/CsvReader.php#L116 is coming back as false on the last line. Switching the do while to a while loop fixes this, but I can't work out why it's happening or replicate it in a test.
Anyway, it doesn't break any existing tests.
This fixes an issue I'm having trying to use CsvReader with the OneToManyReader 👍