| Total Complexity | 5 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class UsernameProcessor implements ProcessorInterface { |
||
| 9 | |||
| 10 | private ?string $username = null; |
||
| 11 | |||
| 12 | public function __construct(private TokenStorageInterface $tokenStorage) |
||
| 13 | { |
||
| 14 | } |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @inheritDoc |
||
| 18 | */ |
||
| 19 | public function __invoke(array $record): array { |
||
| 20 | $record['extra']['username'] = $this->getUsername(); |
||
| 21 | |||
| 22 | return $record; |
||
| 23 | } |
||
| 24 | |||
| 25 | private function getUsername(): ?string { |
||
| 35 | } |
||
| 36 | } |