Commit 58f734e65052303e9fcf7875b089c985a5d2eee7
1 parent
2395ca4f
fixed issue with detection empty column
Showing
3 changed files
with
4 additions
and
9 deletions
Show diff stats
lib/Converter.php
lib/CsvParser.php
| ... | ... | @@ -21,11 +21,6 @@ class CsvParser extends TableParser |
| 21 | 21 | */ |
| 22 | 22 | public function setup() |
| 23 | 23 | { |
| 24 | - | |
| 25 | -// $this->file->setCsvControl($this->delimiter); | |
| 26 | -// $this->file->setFlags(\SplFileObject::READ_CSV); | |
| 27 | -// $this->file->setFlags(\SplFileObject::SKIP_EMPTY); | |
| 28 | - | |
| 29 | 24 | parent::setup(); |
| 30 | 25 | |
| 31 | 26 | } | ... | ... |
lib/TableParser.php
| ... | ... | @@ -68,9 +68,6 @@ abstract class TableParser extends Parser { |
| 68 | 68 | // прочтем строку из файла |
| 69 | 69 | $this->readRow(); |
| 70 | 70 | |
| 71 | - // уберем пустые колонки из ряда | |
| 72 | - $this->filterRow(); | |
| 73 | - | |
| 74 | 71 | if ( $this->isEmptyRow() ) { |
| 75 | 72 | //счетчик пустых строк |
| 76 | 73 | //CustomVarDamp::dump($this->current_row_number); |
| ... | ... | @@ -78,6 +75,9 @@ abstract class TableParser extends Parser { |
| 78 | 75 | continue; |
| 79 | 76 | } |
| 80 | 77 | |
| 78 | + // уберем пустые колонки из ряда | |
| 79 | + $this->filterRow(); | |
| 80 | + | |
| 81 | 81 | $this->adjustRowToSettings( ); |
| 82 | 82 | |
| 83 | 83 | // строка не пустая, имеем прочитанный массив значений | ... | ... |