| Conditions | 4 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 46 | private function validatePasswords(?string $password, ?string $confirmedPassword): bool |
||
| 47 | { |
||
| 48 | if (!$password || !$confirmedPassword) { |
||
| 49 | $this->error('Passwords cannot be empty. You know that.'); |
||
| 50 | |||
| 51 | return false; |
||
| 52 | } |
||
| 53 | |||
| 54 | if (strcmp($password, $confirmedPassword) !== 0) { |
||
| 55 | $this->error('The passwords do not match. Try again maybe?'); |
||
| 56 | |||
| 57 | return false; |
||
| 58 | } |
||
| 59 | |||
| 60 | return true; |
||
| 61 | } |
||
| 63 |