Total Complexity | 7 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 93.33% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class EventCollector implements EventCollectorInterface |
||
13 | { |
||
14 | use CollectorTrait; |
||
15 | |||
16 | private array $events = []; |
||
17 | |||
18 | 1 | public function getCollected(): array |
|
19 | { |
||
20 | 1 | return $this->events; |
|
21 | } |
||
22 | |||
23 | 1 | public function collect(object $event): void |
|
24 | { |
||
25 | 1 | if (!$event instanceof HttpApplicationStartup && !$event instanceof ConsoleApplicationStartup && !$this->isActive()) { |
|
26 | return; |
||
27 | } |
||
28 | |||
29 | 1 | $this->collectEvent($event); |
|
30 | 1 | } |
|
31 | |||
32 | 1 | private function collectEvent(object $event): void |
|
38 | ]; |
||
39 | 1 | } |
|
40 | |||
41 | 1 | private function reset(): void |
|
44 | 1 | } |
|
45 | } |
||
46 |
This check looks for private methods that have been defined, but are not used inside the class.