$year = mt_rand(($currYear - $this->MIN_AGE), ($currYear - $this->MAX_AGE));
$month = 0;
$day = 0;
- while (!$this->isDateValid($year, $month, $day)) {
+ while ($this->isDateValid($year, $month, $day) === false) {
$month = mt_rand(1, 12);
switch ($month) {
case 1:
$day = mt_rand(1, 28);
}
break;
- } // switch - END
- } // while - END
+ } // END - switch
+ } // END - while
// Set the new birthday
$this->setBirthday($year, $month, $day);