Passed
Pull Request — master (#248)
by Fabien
02:47
created

ConsoleResultsRenderer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

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