| 1 | <?php |
||
| 11 | class SimpleGenerator implements GeneratorInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | private const DELIMITER = ';'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private const ENCLOSURE = '"'; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Generates a CSV string from given array data. |
||
| 25 | * |
||
| 26 | * @param array $data |
||
| 27 | * |
||
| 28 | * @return string |
||
| 29 | * |
||
| 30 | * @throws \RuntimeException |
||
| 31 | */ |
||
| 32 | public function generate(array $data): string |
||
| 71 | } |
||
| 72 |