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