X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Fclass_BasePersonell.php;h=e79cd48c869f21f6d3a0f5663e3edbfb4decb8b6;hb=c7191bd714393eb129681d3c1665b96a1ad82f60;hp=a0baf636eaec11440ab52ac50f747e22e34526e4;hpb=d527a312ec4b2983fc0ecda2179ce335c1a5a1f9;p=shipsimu.git diff --git a/application/ship-simu/main/class_BasePersonell.php b/application/ship-simu/main/class_BasePersonell.php index a0baf63..e79cd48 100644 --- a/application/ship-simu/main/class_BasePersonell.php +++ b/application/ship-simu/main/class_BasePersonell.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Ship-Simu Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -51,9 +51,6 @@ class BasePersonell extends BaseFrameworkSystem implements Personellizer { protected function __construct ($className) { // Call parent constructor parent::__construct($className); - - // Set description - $this->setObjectDescription("Personal"); } // Remove min/max ages @@ -74,7 +71,7 @@ class BasePersonell extends BaseFrameworkSystem implements Personellizer { $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: @@ -103,8 +100,8 @@ class BasePersonell extends BaseFrameworkSystem implements Personellizer { $day = mt_rand(1, 28); } break; - } // switch - END - } // while - END + } // END - switch + } // END - while // Set the new birthday $this->setBirthday($year, $month, $day);