]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/main/personell/company/class_CompanyEmployee.php
'public static final' is correct
[shipsimu.git] / application / ship-simu / main / personell / company / class_CompanyEmployee.php
index 32d2abe80b50c2380fe3a50c1d97f7df6484db59..8a32ad2416ab6c5917a2acb3f48220cdd35c01e3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @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
  *
@@ -29,19 +29,10 @@ class CompanyEmployee extends SimulatorPersonell {
        protected function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
-
-               // Set description
-               $this->setObjectDescription("Firmenangestellte(r)");
-
-               // Create unique ID
-               $this->generateUniqueId();
-
-               // Clean up a little
-               $this->removeSystemArray();
        }
 
        // Generate a specified amount of personell
-       public final static function createCompanyEmployee ($surname, $family, $gender, $year, $month, $day, $married, $salary) {
+       public static final function createCompanyEmployee ($surname, $family, $gender, $year, $month, $day, $married, $salary) {
                // Get instance
                $personellInstance = new CompanyEmployee();
 
@@ -56,13 +47,13 @@ class CompanyEmployee extends SimulatorPersonell {
                }
 
                // Ist the given birthday valid?
-               if ($personellInstance->isDateValid($year, $month, $day)) {
-                       // Set birthday
-                       $personellInstance->setBirthday($year, $month, $day);
-               } else {
+               if ($personellInstance->isDateValid($year, $month, $day) === false) {
                        // Something is wrong ...
                        throw new BirthdayInvalidException(array($year, $month, $day), self::EXCEPTION_BIRTH_DATE_IS_INVALID);
-               }
+               } // END - if
+
+               // Set birthday
+               $personellInstance->setBirthday($year, $month, $day);
 
                // Set as employed/marrital status
                $personellInstance->setEmployed(true);