| Total Complexity | 5 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 94.74% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class GenerateStatistics |
||
| 15 | { |
||
| 16 | /** @var TokenParser */ |
||
| 17 | private $parser; |
||
| 18 | |||
| 19 | /** @var StatisticsProcessor */ |
||
| 20 | private $processor; |
||
| 21 | |||
| 22 | /** @var CanGenerateStatistics */ |
||
| 23 | private $command; |
||
| 24 | |||
| 25 | 6 | public function __construct(TokenParser $parser, StatisticsProcessor $processor) |
|
| 26 | { |
||
| 27 | 6 | $this->parser = $parser; |
|
| 28 | 6 | $this->processor = $processor; |
|
| 29 | 6 | } |
|
| 30 | |||
| 31 | 6 | public function attach(CanGenerateStatistics $command): void |
|
| 32 | { |
||
| 33 | 6 | $this->command = $command; |
|
| 34 | 6 | } |
|
| 35 | |||
| 36 | /** @throws LogicException If the command is missing */ |
||
| 37 | 6 | public function generate(CodeFinder $finder, string $filePath): void |
|
| 45 | 6 | } |
|
| 46 | |||
| 47 | /** @throws LogicException */ |
||
| 48 | 6 | private function command(): CanGenerateStatistics |
|
| 54 | } |
||
| 55 | } |