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