Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 12 |
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 = [ |
|
21 | 'Clave identificación', |
||
22 | 'Nacionalidad', |
||
23 | 'Nombre de la aerolínea', |
||
24 | 'Designador OACI', |
||
25 | 'Fecha de inicio de vigencia', |
||
26 | 'Fecha de fin de vigencia', |
||
27 | ]; |
||
28 | 3 | $headers = $csv->readLine(); |
|
29 | |||
30 | 3 | if ($expected !== $headers) { |
|
31 | 1 | throw new RuntimeException("The headers did not match on file {$this->sourceFile()}"); |
|
32 | } |
||
33 | |||
34 | 2 | $csv->next(); |
|
35 | } |
||
49 |