| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | protected function validateSyntax() |
||
| 36 | { |
||
| 37 | $this->fileHandle->rewind(); |
||
| 38 | |||
| 39 | $fields = array_filter(array_map('trim', explode(',', $this->fileHandle->current()))); |
||
| 40 | |||
| 41 | foreach ($this->fileHandle as $row) { |
||
| 42 | if (count($fields) != count(explode(',', $row))) { |
||
| 43 | throw ImportFileException::invalidSyntax($this->file->getFilename()); |
||
| 44 | } |
||
| 45 | } |
||
| 46 | } |
||
| 47 | |||
| 62 |