- XHTML errors/warnings fixed in some pages
[shipsimu.git] / application / ship-simu / main / companies / class_ShippingCompany.php
index 362a801bb51ad331d397b84e2c671d62c3b6cfb9..1d6877b7a92a847a62fe171130832ccfa1dad16e 100644 (file)
@@ -325,7 +325,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                                $iterator->seek($pos);
 
                                // Is the current position valid?
-                               if (!$iterator->valid()) {
+                               if ($iterator->valid() === false) {
                                        // Should normally not happen... :(
                                        throw new StructuresOutOfBoundsException($idx, self::EXCEPTION_INDEX_OUT_OF_BOUNDS);
                                } // END - if
@@ -389,10 +389,10 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                // Iterate through all employees
                for ($idx = $this->employeeList->getIterator(); $idx->valid(); $idx->next()) {
                        // Is the shipyard iterator still okay?
-                       if (!$shipyardIter->valid()) {
+                       if ($shipyardIter->valid() === false) {
                                // Rewind to first position
                                $shipyardIter->seek(0);
-                       }
+                       } // END - if
 
                        // Get Shipyard object
                        $shipyard = $shipyardIter->current();
@@ -404,7 +404,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        } elseif (!is_object($shipyard)) {
                                // Not an object! ;-(
                                throw new NoObjectException($shipyard, self::EXCEPTION_IS_NO_OBJECT);
-                       } elseif (!$shipyard->isClass("Shipyard")) {
+                       } elseif ($shipyard->isClass("Shipyard") === false) {
                                // Nope, so throw exception
                                throw new ClassMismatchException(array($shipyard->__toString(), "Shipyard"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                        }
@@ -492,14 +492,14 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        } elseif (!is_object($shipyard)) {
                                // Not an object! ;-(
                                throw new NoObjectException($shipyard, self::EXCEPTION_IS_NO_OBJECT);
-                       } elseif (!$shipyard->isClass("Shipyard")) {
+                       } elseif ($shipyard->isClass("Shipyard") === false) {
                                // Class is not a shipyard
                                throw new ClassMismatchException(array($shipyard->__toString(), "Shipyard"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                        }
 
                        // Add the new ship type to the shipyard
                        $shipyard->addNewConstructableShipType($shipType);
-               }
+               } // END - for
        }
 
        // Validate the requested ship type with the company if they can construct it
@@ -551,7 +551,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        } elseif (!is_object($shipyard)) {
                                // Not an object! ;-(
                                throw new NoObjectException($shipyard, self::EXCEPTION_IS_NO_OBJECT);
-                       } elseif (!$shipyard->isClass("Shipyard")) {
+                       } elseif ($shipyard->isClass("Shipyard") === false) {
                                // Class is not a shipyard
                                throw new ClassMismatchException(array($shipyard->__toString(), "Shipyard"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                        }
@@ -561,7 +561,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
                        // Does this shipyard construct the requested ship type?
                        if ($result) break; // Then abort the search!
-               }
+               } // END - for
 
                // Debug message
                if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->debugOutput(sprintf("[%s:%d] Die Reederei <strong>%s</strong> hat die Suche nach einer Werft beendet, die Schiffe vom Typ <strong>%s</strong> bauen kann.",
@@ -600,10 +600,10 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
        // Sign a contract with an other party which must also implement Customer
        public function signContract (SignableContract $contractInstance, ContractPartner $partnerInstance) {
                // Check wether the other party is our contract partner
-               if (!$partnerInstance->isContractPartner($contractInstance)) {
+               if ($partnerInstance->isContractPartner($contractInstance) === false) {
                        // Invalid contract partner!
                        throw new InvalidContractPartnerException($partnerInstance, self::EXCEPTION_CONTRACT_PARTNER_INVALID);
-               }
+               } // END - if
 
                // Determine if company "signs" own contract (must be done) or with an other party
                if ($this->equals($partnerInstance)) {
@@ -652,7 +652,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                } elseif (!is_object($contractInstance)) {
                        // Not an object! ;-(
                        throw new NoObjectException($contractInstance, self::EXCEPTION_IS_NO_OBJECT);
-               } elseif (!$contractInstance->isClass('WorksContract')) {
+               } elseif ($contractInstance->isClass("WorksContract") === false) {
                        // Is not a merchant
                        throw new ClassMismatchException(array($contractInstance->__toString(), "WorksContract"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                }