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