Total Complexity | 3 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
18 | final class StatisticsProcessor implements Processor |
||
19 | { |
||
20 | 7 | public function __construct(private readonly TemplateEngine $engine) |
|
|
|||
21 | { |
||
22 | } |
||
23 | |||
24 | 5 | public function name(): string |
|
25 | { |
||
26 | 5 | return 'Statistics'; |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * @throws TemplateFailure |
||
31 | */ |
||
32 | 4 | public function process(Codebase $codebase): OutputContent |
|
33 | { |
||
34 | 4 | $summary = Summary::from($codebase); |
|
35 | |||
36 | 4 | return new OutputContent($this->engine->render('statistics.txt.twig', ['summary' => $summary])); |
|
37 | } |
||
39 |