Total Complexity | 7 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class IdentityCollector implements CollectorInterface, IndexCollectorInterface |
||
13 | { |
||
14 | use CollectorTrait; |
||
15 | |||
16 | private array $identities = []; |
||
17 | |||
18 | public function getCollected(): array |
||
21 | } |
||
22 | |||
23 | public function collect(?IdentityInterface $identity): void |
||
24 | { |
||
25 | if (!$this->isActive()) { |
||
26 | return; |
||
27 | } |
||
28 | |||
29 | if ($identity === null) { |
||
30 | return; |
||
31 | } |
||
32 | |||
33 | $this->identities[] = [ |
||
34 | 'id' => $identity->getId(), |
||
35 | 'class' => $identity::class, |
||
36 | ]; |
||
37 | } |
||
38 | |||
39 | private function reset(): void |
||
|
|||
40 | { |
||
41 | $this->identities = []; |
||
42 | } |
||
43 | |||
44 | public function getIndexData(): array |
||
51 | ], |
||
52 | ]; |
||
53 | } |
||
55 |
This check looks for private methods that have been defined, but are not used inside the class.