| Conditions | 4 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | $this->user = $user; |
||
| 28 | $this->credentialsValidator = $credentialsValidator ?: function () { |
||
| 29 | $this->user->logout(true); |
||
| 30 | try { |
||
| 31 | $this->user->login(...func_get_args()); |
||
| 32 | } catch (\Throwable $e) { |
||
| 33 | // Fail silently |
||
| 34 | } |
||
| 35 | return $this->user->isLoggedIn() ? new UserEntity($this->user->getId()) : null; |
||
| 36 | }; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $username |
||
| 58 |