| 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 | public function __construct(private readonly TemplateEngine $engine) |
||
|
|
|||
| 21 | { |
||
| 22 | } |
||
| 23 | |||
| 24 | public function name(): string |
||
| 25 | { |
||
| 26 | return 'Statistics'; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @throws TemplateFailure |
||
| 31 | */ |
||
| 32 | public function process(Codebase $codebase): OutputContent |
||
| 33 | { |
||
| 34 | $summary = Summary::from($codebase); |
||
| 35 | |||
| 36 | return new OutputContent($this->engine->render('statistics.txt.twig', ['summary' => $summary])); |
||
| 37 | } |
||
| 39 |