Total Complexity | 8 |
Total Lines | 48 |
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( |
|
14 | private readonly TimelineCollector $timelineCollector |
||
15 | 2 | ) { |
|
16 | } |
||
17 | |||
18 | 2 | public function getCollected(): array |
|
19 | { |
||
20 | 2 | if (!$this->isActive()) { |
|
21 | return []; |
||
22 | } |
||
23 | return $this->messages; |
||
24 | 2 | } |
|
25 | 2 | ||
26 | public function collect(string $level, mixed $message, array $context, string $line): void |
||
40 | } |
||
41 | |||
42 | 1 | private function reset(): void |
|
45 | } |
||
46 | |||
47 | public function getSummary(): array |
||
55 | ], |
||
56 | ]; |
||
59 |
This check looks for private methods that have been defined, but are not used inside the class.