ConsoleResultsRenderer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
c 0
b 0
f 0
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Churn\Result\Render;
6
7
use Symfony\Component\Console\Helper\Table;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
/**
11
 * @internal
12
 */
13
final class ConsoleResultsRenderer implements ResultsRendererInterface
14
{
15
    /**
16
     * Renders the results.
17
     *
18
     * @param OutputInterface $output Output Interface.
19
     * @param array<array<float|integer|string>> $results The results.
20
     */
21
    #[\Override]
22
    public function render(OutputInterface $output, array $results): void
23
    {
24
        $table = new Table($output);
25
        $table->setHeaders(['File', 'Times Changed', 'Complexity', 'Score']);
26
        $table->addRows($results);
27
        $table->render();
28
    }
29
}
30