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