getter, setter are all final; several code clean-ups
[shipsimu.git] / application / ship-simu / main / personell / class_SimulatorPersonell.php
index b46bb03dd01642a2e97ebd3d56b46a63796cd157..532ca3f394f20ba77f27aa9b075775e16bc188da 100644 (file)
@@ -55,7 +55,7 @@ class SimulatorPersonell extends BasePersonell {
         *
         * @param               $amountPersonell                Number of personell we shall
         *                                                              generate
-        * @return      $personellInstance              An instance of this object with a 
+        * @return      $personellInstance              An instance of this object with a
         *                                                              list of personells
         */
        public static function createSimulatorPersonell ($amountPersonell) {
@@ -65,9 +65,6 @@ class SimulatorPersonell extends BasePersonell {
                // Get a new instance
                $personellInstance = new SimulatorPersonell();
 
-               // Generate unique ID number
-               $personellInstance->createUniqueID();
-
                // Debug message
                if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $personellInstance->getDebugInstance()->output(sprintf("[%s:%d] Es werden <strong>%d</strong> Personal bereitgestellt.<br />\n",
                        __CLASS__,
@@ -80,7 +77,7 @@ class SimulatorPersonell extends BasePersonell {
 
                // Create requested amount of personell
                for ($idx = 0; $idx < $amountPersonell; $idx++) {
-                       $personellInstance->addPersonell();
+                       $personellInstance->addRandomPersonell();
                }
 
                // Debug message
@@ -110,7 +107,7 @@ class SimulatorPersonell extends BasePersonell {
         * list from an existing database backend
         *
         * @param               $idNumber               The ID number (only right part) of the list
-        * @return      $personellInstance      An instance of 
+        * @return      $personellInstance      An instance of
         * @throws      InvalidIDFormatException                If the given id number
         *                                                                      $idNumber is invalid
         * @throws      NullPointerException            If a null pointer (instance)
@@ -201,7 +198,7 @@ class SimulatorPersonell extends BasePersonell {
        }
 
        // Add new personell object to our list
-       public function addPersonell () {
+       public function addRandomPersonell () {
                // Gender list...
                $genders = array('M', 'F');
 
@@ -286,7 +283,7 @@ class SimulatorPersonell extends BasePersonell {
         *
         * @return      $count  Amount of unemployed personell
         */
-       public function getAllUnemployed () {
+       public final function getAllUnemployed () {
                if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Es werden alle erwerbslosen Personen gesucht.<br />\n",
                        __CLASS__,
                        __LINE__
@@ -379,7 +376,7 @@ class SimulatorPersonell extends BasePersonell {
         * @return      void
         */
        public function saveObjectToDatabase () {
-               // Get the database 
+               // Get the database
                $dbInstance = $this->getDatabaseInstance();
 
                // Prepare the limitation object. We just need the personellList array object.
@@ -397,7 +394,7 @@ class SimulatorPersonell extends BasePersonell {
         *
         * @return      $personellList          The list of all personells
         */
-       public function getPersonellList () {
+       public final function getPersonellList () {
                return $this->personellList;
        }