Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | 2 | public function loadUserByUsername($username) |
|
36 | { |
||
37 | 2 | $userId = $this->redis->HGET(DatabaseUserProvider::REDIS_USER_NAMES, strtolower($username)); |
|
38 | |||
39 | 2 | if (empty($userId)) { |
|
40 | 1 | throw new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username)); |
|
41 | } |
||
42 | |||
43 | 1 | return $this->loadUserById($userId); |
|
44 | } |
||
45 | |||
79 |