| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class CsvResultsRenderer implements ResultsRendererInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Renders the results. |
||
| 16 | * |
||
| 17 | * @param OutputInterface $output Output Interface. |
||
| 18 | * @param array<array<float|integer|string>> $results The results. |
||
| 19 | */ |
||
| 20 | #[\Override] |
||
| 21 | public function render(OutputInterface $output, array $results): void |
||
| 22 | { |
||
| 23 | $output->writeln($this->getHeader()); |
||
| 24 | |||
| 25 | foreach ($results as $result) { |
||
| 26 | $output->writeln(\implode(';', ['"' . \strval($result[0]) . '"', $result[1], $result[2], $result[3]])); |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get the header. |
||
| 32 | */ |
||
| 33 | private function getHeader(): string |
||
| 36 | } |
||
| 37 | } |
||
| 38 |