| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | protected function getCsvFixtureData(): \Iterator |
||
| 12 | { |
||
| 13 | $file = $this->getCsvFileName(); |
||
| 14 | |||
| 15 | if (!file_exists($file)) { |
||
| 16 | throw new \InvalidArgumentException($file . ' does not exist.'); |
||
| 17 | } |
||
| 18 | |||
| 19 | $csv = Reader::createFromPath($file); |
||
| 20 | $csv->setHeaderOffset(0); |
||
| 21 | $header = $csv->getHeader(); |
||
| 22 | $records = $csv->getRecords($header); |
||
| 23 | $records->rewind(); |
||
| 24 | |||
| 25 | return $records; |
||
| 26 | } |
||
| 31 |