| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 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 | 1 | if ($user[self::_EMAIL] === $email |
|
| 61 | 1 | && $password === $user[self::_PASSWORD] |
|
| 62 | ) { |
||
| 63 | 1 | return $user; |
|
| 64 | } |
||
| 65 | } |
||
| 66 | 1 | return []; |
|
| 67 | } |
||
| 80 |