| Conditions | 2 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function loadUserByUsername($username) |
||
| 27 | { |
||
| 28 | try { |
||
| 29 | $response = $this->api->getUserById($username); |
||
| 30 | return new AlmaUser($username, array('ROLE_USER'), $this->userData->getFullNameAsString($response)); |
||
| 31 | } catch (\GuzzleHttp\Exception\GuzzleException $e) { |
||
| 32 | $this->logger->error($e->getCode() . $e->getMessage()); |
||
| 33 | } |
||
| 34 | |||
| 35 | throw new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username)); |
||
| 36 | } |
||
| 51 |