| Total Complexity | 8 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 90.91% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class LogCollector implements SummaryCollectorInterface |
||
| 8 | { |
||
| 9 | use CollectorTrait; |
||
| 10 | |||
| 11 | private array $messages = []; |
||
| 12 | |||
| 13 | 2 | public function __construct(private TimelineCollector $timelineCollector, ) |
|
|
|
|||
| 14 | { |
||
| 15 | 2 | } |
|
| 16 | |||
| 17 | public function getCollected(): array |
||
| 18 | 2 | { |
|
| 19 | if (!$this->isActive()) { |
||
| 20 | 2 | return []; |
|
| 21 | } |
||
| 22 | return $this->messages; |
||
| 23 | } |
||
| 24 | 2 | ||
| 25 | 2 | public function collect(string $level, $message, array $context, string $line): void |
|
| 39 | } |
||
| 40 | |||
| 41 | private function reset(): void |
||
| 44 | } |
||
| 45 | |||
| 46 | public function getSummary(): array |
||
| 54 | ], |
||
| 55 | ]; |
||
| 58 |