| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.3332 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 30 | 1 | public function onAuthenticationSuccess(AuthenticationSuccessEvent $event): void |
|
| 31 | { |
||
| 32 | 1 | $user = $event->getUser(); |
|
| 33 | |||
| 34 | 1 | if (!$user instanceof User) { |
|
| 35 | return; |
||
| 36 | } |
||
| 37 | |||
| 38 | try { |
||
| 39 | 1 | $userData = $this->normalizer->normalize($user, null, ['groups' => ['me']]); |
|
| 40 | 1 | $eventData = $event->getData(); |
|
| 41 | } catch (ExceptionInterface $exception) { |
||
| 42 | return; |
||
| 43 | } |
||
| 44 | |||
| 45 | 1 | $event->setData(['user' => array_merge($userData, $eventData)]); |
|
| 46 | } |
||
| 48 |