heimrichhannot / contao-entity-import-bundle

2 stars 2 forks source link

add csvSkipEmptyLines #2

Closed SGehle closed 4 years ago

SGehle commented 4 years ago

Add an option to skip empty lines in csv files.

Defcon0 commented 4 years ago

Just in case you can't see the comment I did in the review, here's my message again ;-)

Thanks for the PR!

Our codestyle enforces the short array syntax. So it would need to be [null]. Did you test if $current ain't [] or null instead of [null]?

Also it would be nice if you could simplify the comparison so that the negation is applied to the two sides, i.e. !$this->sourceModel->csvSkipEmptyLines || [null] !== $current.

SGehle commented 4 years ago

I checked $current for an empty row, its [null] instead of [] or null

Defcon0 commented 4 years ago

Merged and tagged (0.18.0). Thanks!