Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
55 | 1 | public function auth(string $email, string $password): array |
|
56 | { |
||
57 | 1 | $acNumber = count($this->accounts); |
|
58 | 1 | for ($c = 0; $c < $acNumber; $c++) { |
|
59 | 1 | $user = $this->accounts[$c]; |
|
60 | if ( |
||
61 | 1 | $user[self::_EMAIL] === $email |
|
62 | 1 | && $password === $user[self::_PASSWORD] |
|
63 | ) { |
||
64 | 1 | return $user; |
|
65 | } |
||
66 | } |
||
67 | 1 | return []; |
|
68 | } |
||
84 |