| Total Complexity | 6 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 19 | final class ConsoleProgressDisplay implements ProgressDisplay |
||
| 20 | { |
||
| 21 | 28 | public function __construct(private readonly OutputInterface $output) |
|
|
|
|||
| 22 | { |
||
| 23 | } |
||
| 24 | |||
| 25 | 14 | public function start(): void |
|
| 26 | { |
||
| 27 | 14 | $this->display('Running... (This may take some time)'); |
|
| 28 | } |
||
| 29 | |||
| 30 | 14 | public function runningParser(): void |
|
| 31 | { |
||
| 32 | 14 | $this->display('Parsing codebase structure'); |
|
| 33 | } |
||
| 34 | |||
| 35 | 16 | public function runningProcessor(Processor $processor): void |
|
| 36 | { |
||
| 37 | 16 | $this->display("Running '{$processor->name()}' processor"); |
|
| 38 | } |
||
| 39 | |||
| 40 | 14 | public function savingResult(): void |
|
| 41 | { |
||
| 42 | 14 | $this->display('Writing generated data to disk'); |
|
| 43 | } |
||
| 44 | |||
| 45 | 22 | private function display(string $message): void |
|
| 46 | { |
||
| 47 | 22 | $this->output->writeln("<info>[|]</info> $message"); |
|
| 48 | } |
||
| 50 |