| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function convert(string $fileName, $delimiter = ',') |
||
| 24 | { |
||
| 25 | $handle = $this->getFileHandle($fileName); |
||
| 26 | if ($handle === false) { |
||
| 27 | return array(); |
||
| 28 | } |
||
| 29 | |||
| 30 | while (($row = fgetcsv($handle, 0, $delimiter)) !== false) { |
||
| 31 | $this->fillData($row); |
||
| 32 | } |
||
| 33 | fclose($handle); |
||
| 34 | |||
| 35 | return $this->data; |
||
| 36 | } |
||
| 37 | |||
| 68 |