Total Complexity | 4 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class MarkdownResultsRenderer 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('| File | Times Changed | Complexity | Score |'); |
||
24 | $output->writeln('|------|---------------|------------|-------|'); |
||
25 | |||
26 | foreach ($results as $result) { |
||
27 | $output->writeln($this->inline($result)); |
||
28 | } |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param array<float|integer|string> $data The data to inline. |
||
33 | */ |
||
34 | private function inline(array $data): string |
||
43 | } |
||
44 | } |
||
45 |