| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class Writer extends AbstractBase |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @param string|string[] $row |
||
| 15 | * |
||
| 16 | * @return false|int |
||
| 17 | */ |
||
| 18 | 5 | public function writeRow($row) |
|
| 19 | { |
||
| 20 | 5 | if (is_string($row)) { |
|
| 21 | 5 | $row = explode(',', $row); |
|
| 22 | 5 | $row = array_map('trim', $row); |
|
| 23 | } |
||
| 24 | |||
| 25 | 5 | return $this->getHandle()->fputcsv($row, $this->delimiter, $this->enclosure); |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param mixed[][] $array |
||
| 30 | */ |
||
| 31 | 2 | public function writeFromArray(array $array) : void |
|
| 35 | } |
||
| 36 | 2 | } |
|
| 38 |