Total Complexity | 8 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class ServiceCollector implements SummaryCollectorInterface |
||
8 | { |
||
9 | use CollectorTrait; |
||
10 | |||
11 | private array $items = []; |
||
12 | |||
13 | 2 | public function __construct(private TimelineCollector $timelineCollector) |
|
15 | 2 | } |
|
16 | |||
17 | public function getCollected(): array |
||
18 | 7 | { |
|
19 | if (!$this->isActive()) { |
||
20 | return []; |
||
21 | } |
||
22 | return $this->items; |
||
23 | } |
||
24 | |||
25 | public function collect( |
||
52 | } |
||
53 | |||
54 | public function getSummary(): array |
||
55 | 1 | { |
|
56 | if (!$this->isActive()) { |
||
57 | 1 | return []; |
|
58 | } |
||
59 | return [ |
||
60 | 'service' => [ |
||
61 | 'total' => count($this->items), |
||
62 | ], |
||
63 | ]; |
||
64 | } |
||
65 | |||
66 | private function reset(): void |
||
69 | } |
||
70 | } |
||
71 |
This check looks for private methods that have been defined, but are not used inside the class.