| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function getUser(): ?UserInterface |
||
| 30 | { |
||
| 31 | $token = $this->tokenStorage->getToken(); |
||
| 32 | if ($token === null) { |
||
| 33 | return null; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** @var UserInterface|string $user */ |
||
| 37 | $user = $token->getUser(); |
||
| 38 | if (is_string($user)) { |
||
| 39 | return null; |
||
| 40 | } |
||
| 41 | |||
| 42 | return $user; |
||
| 43 | } |
||
| 44 | } |
||
| 45 |