| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function getOutput() |
||
| 15 | { |
||
| 16 | $delimiter = ','; |
||
| 17 | |||
| 18 | $handle = fopen('php://memory', 'w'); |
||
| 19 | |||
| 20 | fputcsv($handle, $this->getDefinitions()->toArray(), $delimiter); |
||
| 21 | |||
| 22 | $this->getData()->each(function ($record) use ($handle, $delimiter) { |
||
| 23 | fputcsv($handle, $record, $delimiter); |
||
| 24 | }); |
||
| 25 | |||
| 26 | fseek($handle, 0); |
||
| 27 | |||
| 28 | return $this->getCsvContentsFromHandle($handle); |
||
| 29 | } |
||
| 30 | |||
| 50 |