Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 3 | public function checkHeaders(CsvFile $csv): void |
|
22 | { |
||
23 | 3 | $csv->move(3); |
|
24 | 3 | $expected = [ |
|
25 | 'c_Moneda', |
||
26 | 'Descripción', |
||
27 | 'Decimales', |
||
28 | 'Porcentaje variación', |
||
29 | 'Fecha inicio de vigencia', |
||
30 | 'Fecha fin de vigencia', |
||
31 | ]; |
||
32 | 3 | $headers = array_rtrim($csv->readLine()); |
|
33 | |||
34 | 3 | if ($expected !== $headers) { |
|
35 | 1 | throw new RuntimeException("The headers did not match on file {$this->sourceFile()}"); |
|
36 | } |
||
37 | |||
38 | 2 | $csv->next(); |
|
39 | } |
||
53 |