| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 3 | public function checkHeaders(CsvFile $csv): void |
|
| 18 | { |
||
| 19 | 3 | $csv->move(3); |
|
| 20 | 3 | $expected = ['c_Colonia', 'c_CodigoPostal', 'Nombre del asentamiento']; |
|
| 21 | 3 | $headers = $csv->readLine(); |
|
| 22 | |||
| 23 | 3 | if ($expected !== $headers) { |
|
| 24 | 1 | throw new RuntimeException("The headers did not match on file {$this->sourceFile()}"); |
|
| 25 | } |
||
| 26 | |||
| 27 | 2 | $csv->next(); |
|
| 28 | } |
||
| 39 |