| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function getCustomer(): ?CustomerInterface |
||
| 48 | { |
||
| 49 | if (null === $token = $this->tokenStorage->getToken()) { |
||
| 50 | return null; |
||
| 51 | } |
||
| 52 | |||
| 53 | if ($this->authorizationChecker->isGranted('IS_AUTHENTICATED_REMEMBERED') && $token->getUser() instanceof UserInterface) { |
||
| 54 | return $token->getUser()->getCustomer(); |
||
| 55 | } |
||
| 56 | |||
| 57 | return null; |
||
| 58 | } |
||
| 59 | } |
||
| 60 |