Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | private function askForPassword(): string |
||
8 | { |
||
9 | do { |
||
10 | $password = $this->secret('Your desired password'); |
||
|
|||
11 | |||
12 | if (!$password) { |
||
13 | $this->error('Passwords cannot be empty. You know that.'); |
||
14 | continue; |
||
15 | } |
||
16 | |||
17 | $confirmedPassword = $this->secret('Again, just to be sure'); |
||
18 | } while (!$this->comparePasswords($password, $confirmedPassword ?? null)); |
||
19 | |||
20 | return $password; |
||
21 | } |
||
38 |