| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function attempt(array $credentials = []): bool |
||
| 32 | { |
||
| 33 | $user = $this->provider->retrieveByCredentials($credentials); |
||
| 34 | |||
| 35 | if (null === $user) { |
||
| 36 | return false; |
||
| 37 | } |
||
| 38 | |||
| 39 | if (true === $this->provider->validateCredentials($user, $credentials)) { |
||
| 40 | $this->setUser($user); |
||
| 41 | |||
| 42 | return true; |
||
| 43 | } |
||
| 44 | |||
| 45 | return false; |
||
| 46 | } |
||
| 56 |