| Conditions | 5 | 
| Paths | 3 | 
| Total Lines | 17 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 30 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 28 | protected function askPassword()  | 
            ||
| 29 |     { | 
            ||
| 30 | $password = $passwordConfirm = null;  | 
            ||
| 31 | $tries = 0;  | 
            ||
| 32 | |||
| 33 |         while (!$password || strlen($password) < 4 || $password != $passwordConfirm) { | 
            ||
| 34 |             if ($tries > 2) { | 
            ||
| 35 |                 throw new \Exception('Aborting. Too many failed attempts to set password'); | 
            ||
| 36 | }  | 
            ||
| 37 | |||
| 38 |             $password = $this->secret('Password (min. 5 chars)'); | 
            ||
| 39 |             $passwordConfirm = $this->secret('Password (confirm)'); | 
            ||
| 40 | |||
| 41 | $tries++;  | 
            ||
| 42 | }  | 
            ||
| 43 | |||
| 44 | return $password;  | 
            ||
| 45 | }  | 
            ||
| 47 |