]> git.mxchange.org Git - hub.git/commitdiff
Made lower to upper case:
authorRoland Häder <roland@mxchange.org>
Fri, 31 May 2013 20:04:14 +0000 (20:04 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 31 May 2013 20:04:14 +0000 (20:04 +0000)
- NULL
- FALSE
- TRUE

As they are constants, lower-case are keywords

31 files changed:
application/hub/interfaces/apt-proxy/class_AptProxy.php
application/hub/interfaces/chat/class_Chatter.php
application/hub/interfaces/cruncher/class_CruncherHelper.php
application/hub/main/apt-proxy/class_BaseNodeAptProxy.php
application/hub/main/chat/class_BaseNodeChat.php
application/hub/main/class_BaseHubSystem.php
application/hub/main/cruncher/class_BaseHubCruncher.php
application/hub/main/discovery/socket/class_PackageSocketDiscovery.php
application/hub/main/filter/apt-proxy/class_AptProxyPhpRequirementsFilter.php
application/hub/main/filter/chat/class_ChatPhpRequirementsFilter.php
application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php
application/hub/main/filter/node/class_NodePhpRequirementsFilter.php
application/hub/main/handler/chunks/class_ChunkHandler.php
application/hub/main/handler/network/tcp/class_
application/hub/main/handler/network/tcp/class_TcpRawDataHandler.php
application/hub/main/handler/tasks/class_TaskHandler.php
application/hub/main/helper/connection/class_BaseConnectionHelper.php
application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php
application/hub/main/listener/class_BaseListener.php
application/hub/main/listener/tcp/class_
application/hub/main/nodes/class_BaseHubNode.php
application/hub/main/package/class_NetworkPackage.php
application/hub/main/package/fragmenter/class_PackageFragmenter.php
application/hub/main/pools/peer/class_DefaultPeerPool.php
application/hub/main/registry/connection/class_ConnectionRegistry.php
application/hub/main/registry/socket/class_SocketRegistry.php
application/hub/main/resolver/command/console/class_HubConsoleCommandResolver.php
application/hub/main/resolver/controller/console/class_HubConsoleControllerResolver.php
application/hub/main/resolver/controller/http/class_HubHttpControllerResolver.php
application/hub/main/resolver/state/class_BaseStateResolver.php
index.php

index 935df79e3254d36ecec9c0a3cb8c35006f45b0d2..644a36833e1b7f85d592b04b5cf8f73818d6c612 100644 (file)
@@ -55,7 +55,7 @@ interface AptProxy extends FrameworkInterface {
         * @param       $version        Version number of this apt-proxy
         * @return      void
         */
-       function enableIsActive ($isActive = true);
+       function enableIsActive ($isActive = TRUE);
 
        /**
         * Determines whether the apt-proxy is active
index 7e39a10ea9f6759e96d16dbe2aa7d50fb4618180..bbf10c1d7db5856577bb6aa878a1c5963e38b4f7 100644 (file)
@@ -55,7 +55,7 @@ interface Chatter extends FrameworkInterface {
         * @param       $version        Version number of this chatter
         * @return      void
         */
-       function enableIsActive ($isActive = true);
+       function enableIsActive ($isActive = TRUE);
 
        /**
         * Determines whether the chatter is active
index 0c23d22ca49fb5e1f27aeb7d0800b4a78d3ed0b7..ba5c9b29ec8bd1a7dad1277c71a2fb77c6f35e91 100644 (file)
@@ -64,7 +64,7 @@ interface CruncherHelper extends FrameworkInterface {
         * @param       $version        Version number of this cruncher
         * @return      void
         */
-       function enableIsActive ($isActive = true);
+       function enableIsActive ($isActive = TRUE);
 
        /**
         * Determines whether the cruncher is active
index be1d3f5fcb5327d7dd101af4ad4f1fb435f057b6..c6b7abcfa64bddba4ae145b5242b715148f4c89d 100644 (file)
@@ -25,7 +25,7 @@ class BaseNodeAptProxy extends BaseHubSystem {
        /**
         * Whether this apt-proxy is active
         */
-       private $isActive = false;
+       private $isActive = FALSE;
 
        /**
         * Protected constructor
@@ -44,7 +44,7 @@ class BaseNodeAptProxy extends BaseHubSystem {
         * @param       $version        Version number of this apt-proxy
         * @return      void
         */
-       public final function enableIsActive ($isActive = true) {
+       public final function enableIsActive ($isActive = TRUE) {
                $this->isActive = (bool) $isActive;
        }
 
index 2678bf1b005a36ef0e3fc707f53b23ca8c7cd619..e2b729c3614b4b0695ca4cba765fe92a3d2768d0 100644 (file)
@@ -25,7 +25,7 @@ class BaseNodeChat extends BaseHubSystem {
        /**
         * Whether this Chatter is active
         */
-       private $isActive = false;
+       private $isActive = FALSE;
 
        /**
         * Protected constructor
@@ -44,7 +44,7 @@ class BaseNodeChat extends BaseHubSystem {
         * @param       $version        Version number of this chatter
         * @return      void
         */
-       public final function enableIsActive ($isActive = true) {
+       public final function enableIsActive ($isActive = TRUE) {
                $this->isActive = (bool) $isActive;
        }
 
index b637cc3395cde93a8c65dd2d33bb1319ad0b1ddb..6d34489d6321b371faf8894690769f5e4f19520c 100644 (file)
@@ -446,7 +446,7 @@ class BaseHubSystem extends BaseFrameworkSystem {
         */
        protected function isValidFinalChunk (array $chunks) {
                // Default is all fine
-               $isValid = true;
+               $isValid = TRUE;
 
                // Split the (possible) EOP chunk
                $chunkSplits = explode(PackageFragmenter::CHUNK_DATA_HASH_SEPARATOR, $chunks[count($chunks) - 1]);
@@ -458,10 +458,10 @@ class BaseHubSystem extends BaseFrameworkSystem {
                // Validate final chunk
                if (substr($chunkSplits[ChunkHandler::CHUNK_SPLITS_INDEX_RAW_DATA], 0, strlen(PackageFragmenter::END_OF_PACKAGE_IDENTIFIER)) != PackageFragmenter::END_OF_PACKAGE_IDENTIFIER) {
                        // Not fine
-                       $isValid = false;
+                       $isValid = FALSE;
                } elseif (substr_count($chunkSplits[ChunkHandler::CHUNK_SPLITS_INDEX_RAW_DATA], PackageFragmenter::CHUNK_HASH_SEPARATOR) != 1) {
                        // CHUNK_HASH_SEPARATOR shall only be found once
-                       $isValid = false;
+                       $isValid = FALSE;
                }
 
                // Return status
index 9eab56368d414695657e594bac89ff2d2a6f5b3a..d55ba6bef23fe34867bdfa2c4632678d1f123b17 100644 (file)
@@ -30,7 +30,7 @@ abstract class BaseHubCruncher extends BaseHubSystem implements Updateable {
        /**
         * By default no cruncher is active
         */
-       private $isActive = false;
+       private $isActive = FALSE;
 
        /**
         * All buffer queue instances (a FIFO)
@@ -121,7 +121,7 @@ abstract class BaseHubCruncher extends BaseHubSystem implements Updateable {
         * @param       $version        Version number of this cruncher
         * @return      void
         */
-       public final function enableIsActive ($isActive = true) {
+       public final function enableIsActive ($isActive = TRUE) {
                $this->isActive = (bool) $isActive;
        }
 
index 93f30ae302dced50f5654f78d40fc2af385273b0..9745185fc692007eb507edb22c3947dd7870e37f 100644 (file)
@@ -140,7 +140,7 @@ class PackageSocketDiscovery extends BaseHubDiscovery implements DiscoverableSoc
                }
 
                // Is it false, the recipient isn't known to us and we have no connection to it
-               if (($socketResource === false) || (!is_resource($socketResource)) || (socket_last_error($socketResource) > 0)) {
+               if (($socketResource === FALSE) || (!is_resource($socketResource)) || (socket_last_error($socketResource) > 0)) {
                        // Try to create a new socket resource
                        try {
                                // Possibly noisy debug message
@@ -169,7 +169,7 @@ class PackageSocketDiscovery extends BaseHubDiscovery implements DiscoverableSoc
                        self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __LINE__ . ']: Cannot discover socket resource for recipient ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ': ' . $e->getMessage());
 
                        // Make any failed attempts to 'false'
-                       $socketResource = false;
+                       $socketResource = FALSE;
                }
 
                // And return it
index a8f192cf1cd47be3b970e611240505866d2ca6e6..19e50c18cb019381e18855cc0873adc5891e6735 100644 (file)
@@ -56,18 +56,18 @@ class AptProxyPhpRequirementsFilter extends BaseAptProxyFilter implements Filter
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // By default, the requirement check is passed and zero checks are failed
-               $checkPassed = true;
+               $checkPassed = TRUE;
                $checksFailed = 0;
 
                // Socket support is essential...
                if (!function_exists('socket_create')) {
                        // Test failed
-                       $checkPassed = false;
+                       $checkPassed = FALSE;
                        $checksFailed++;
                } // END -if
 
                // Are all tests passed?
-               if ($checkPassed === false) {
+               if ($checkPassed === FALSE) {
                        // Throw an exception
                        throw new FilterChainException($this, self::FILTER_CHAIN_INTERCEPTED);
                } // END - if
index ce2a04c0019e9eb8224b208afd471b17e7c026aa..493cff265de1a777ea7c8bacb0b4977dad519192 100644 (file)
@@ -56,18 +56,18 @@ class ChatPhpRequirementsFilter extends BaseChatFilter implements Filterable {
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // By default, the requirement check is passed and zero checks are failed
-               $checkPassed = true;
+               $checkPassed = TRUE;
                $checksFailed = 0;
 
                // Socket support is essential...
                if (!function_exists('socket_create')) {
                        // Test failed
-                       $checkPassed = false;
+                       $checkPassed = FALSE;
                        $checksFailed++;
                } // END -if
 
                // Are all tests passed?
-               if ($checkPassed === false) {
+               if ($checkPassed === FALSE) {
                        // Throw an exception
                        throw new FilterChainException($this, self::FILTER_CHAIN_INTERCEPTED);
                } // END - if
index cbafdd088b26377ce7e831492d26e294d66d02a2..1d79e46ac6b225e9eb8f1ebc99e753469c51af36 100644 (file)
@@ -56,18 +56,18 @@ class CruncherPhpRequirementsFilter extends BaseCruncherFilter implements Filter
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // By default, the requirement check is passed and zero checks are failed
-               $checkPassed = true;
+               $checkPassed = TRUE;
                $checksFailed = 0;
 
                // Socket support is essential...
                if (!function_exists('socket_create')) {
                        // Test failed
-                       $checkPassed = false;
+                       $checkPassed = FALSE;
                        $checksFailed++;
                } // END -if
 
                // Are all tests passed?
-               if ($checkPassed === false) {
+               if ($checkPassed === FALSE) {
                        // Throw an exception
                        throw new FilterChainException($this, self::FILTER_CHAIN_INTERCEPTED);
                } // END - if
index f905e23551adaf20bc0e684c4881a8e9341f5836..d88bef622a77e976c921a569e0292e8cd8e9a597 100644 (file)
@@ -56,18 +56,18 @@ class NodePhpRequirementsFilter extends BaseNodeFilter implements Filterable {
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // By default, the requirement check is passed and zero checks are failed
-               $checkPassed = true;
+               $checkPassed = TRUE;
                $checksFailed = 0;
 
                // Socket support is essential...
                if (!function_exists('socket_create')) {
                        // Test failed
-                       $checkPassed = false;
+                       $checkPassed = FALSE;
                        $checksFailed++;
                } // END -if
 
                // Are all tests passed?
-               if ($checkPassed === false) {
+               if ($checkPassed === FALSE) {
                        // Throw an exception
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
index 1f3506797f50536cfe8cbdde87165c4fe2f3f159..03f51495770d26cd263ba2bb55825bc4fda4c575 100644 (file)
@@ -215,7 +215,7 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable
                 * As for now, just set the array element. If any further steps are
                 * being added, this should always be the last step.
                 */
-               $this->finalPackageChunks['is_complete'] = true;
+               $this->finalPackageChunks['is_complete'] = TRUE;
        }
 
        /**
@@ -401,7 +401,7 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable
         */
        public function ifUnhandledChunksWithFinalAvailable () {
                // Simply check if the stacker is not empty
-               $unhandledChunks = $this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_CHUNKS_WITH_FINAL_EOP) === false;
+               $unhandledChunks = $this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_CHUNKS_WITH_FINAL_EOP) === FALSE;
 
                // Return result
                return $unhandledChunks;
@@ -480,7 +480,7 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable
         */
        public function ifUnassembledChunksAvailable () {
                // For now do only check the array element 'is_complete'
-               $unassembledChunksAvailable = ($this->finalPackageChunks['is_complete'] === true);
+               $unassembledChunksAvailable = ($this->finalPackageChunks['is_complete'] === TRUE);
 
                // Return status
                return $unassembledChunksAvailable;
index 512976016602cf1c5c147b477c717c9228b0bc67..9324cf1fcdbf5688b9ea1c9208718368b3ed5d18 100644 (file)
@@ -46,7 +46,7 @@ while (count($clients) > 0) {
                $data = @socket_read($read_sock, 1024, PHP_NORMAL_READ);
 
                // check if the client is disconnected
-               if (($data === false) || (in_array(strtolower(trim($data)), $leaving))) {
+               if (($data === FALSE) || (in_array(strtolower(trim($data)), $leaving))) {
 
                        // remove client for $clients array
                        $key = array_search($read_sock, $clients);
index fc9c94f9181a3e1e74da1ce0b8eef3c849612844..7b711232c7bca04520bea47fbca4947198df94c9 100644 (file)
@@ -77,7 +77,7 @@ class TcpRawDataHandler extends BaseRawDataHandler implements Networkable {
 
                // Debug output of read data length
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-HANDLER[' . __LINE__ . ']: rawData[' . gettype($rawData) . ']=' . strlen($rawData) . ',MD5=' . md5($rawData) . ',resource=' . $socketArray[BasePool::SOCKET_ARRAY_RESOURCE] . ',error=' . socket_strerror(socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE])));
-               //* NOISY-DEBUG: */ if ($rawData !== false) self::createDebugInstance(__CLASS__)->debugOutput('TCP-HANDLER[' . __LINE__ . ']: rawData=' . $rawData);
+               //* NOISY-DEBUG: */ if ($rawData !== FALSE) self::createDebugInstance(__CLASS__)->debugOutput('TCP-HANDLER[' . __LINE__ . ']: rawData=' . $rawData);
 
                // Is it valid?
                if (socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]) == 11) {
@@ -93,7 +93,7 @@ class TcpRawDataHandler extends BaseRawDataHandler implements Networkable {
 
                         // Skip any further processing
                         return;
-               } elseif (($rawData === false) || (socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]) > 0)) {
+               } elseif (($rawData === FALSE) || (socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]) > 0)) {
                        // Network error or connection lost
                        $this->setErrorCode(socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]));
                } elseif (empty($rawData)) {
index d09646d851b64bae5d829349dd8ba8fecb6aaf27..271a0a9c6713abd7ca3da1796ba499d3cc8b9555 100644 (file)
@@ -80,7 +80,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
         */
        private function executeCurrentTask () {
                // Update no task by default
-               $updateTask = false;
+               $updateTask = FALSE;
 
                // Is the current task valid?
                if (!$this->getListInstance()->getIterator()->valid()) {
@@ -92,7 +92,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                $currentTask = $this->getListInstance()->getIterator()->current();
 
                // Is the task not yet started?
-               if ($currentTask['task_started'] === false) {
+               if ($currentTask['task_started'] === FALSE) {
                        // Determine difference between current time and registration
                        $diff = ($this->getMilliTime() - $currentTask['task_registered']) * 1000;
 
@@ -103,8 +103,8 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                        } // END - if
 
                        // Launch the task and mark it as updated
-                       $currentTask['task_started'] = true;
-                       $updateTask = true;
+                       $currentTask['task_started'] = TRUE;
+                       $updateTask = TRUE;
 
                        // Debug message
                        self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __LINE__ . ']: Task ' . $currentTask['id'] . ' started with startup_delay=' . $currentTask['task_startup_delay'] . 'ms');
@@ -116,7 +116,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                // Is the interval delay reached?
                if ((($diff < $currentTask['task_interval_delay']) && ($currentTask['task_max_runs'] == 0)) || (($currentTask['task_total_runs'] == $currentTask['task_max_runs']) && ($currentTask['task_max_runs'] > 0))) {
                        // Should we update the task from startup?
-                       if ($updateTask === true) {
+                       if ($updateTask === TRUE) {
                                // Update the task before leaving
                                $this->updateTask($currentTask);
                        } // END - if
index efe7bbc88e05c66939d4f8bc1cb4d6a9930bf59e..c41d22eb47f8617b691a51e12f1c0e0d4f2d009c 100644 (file)
@@ -68,12 +68,12 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
        /**
         * Whether this connection is initialized
         */
-       private $isInitialized = false;
+       private $isInitialized = FALSE;
 
        /**
         * Whether this connection is shutted down
         */
-       private $shuttedDown = false;
+       private $shuttedDown = FALSE;
 
        /**
         * Currently queued chunks
@@ -218,7 +218,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
                } // END - if
 
                // Last step: mark connection as initialized
-               $this->isInitialized = true;
+               $this->isInitialized = TRUE;
        }
 
        /**
@@ -232,7 +232,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
         */
        protected function connectToPeerByRecipientData (array $recipientData) {
                // Only call this if the connection is initialized by initConnection()
-               assert($this->isInitialized === true);
+               assert($this->isInitialized === TRUE);
 
                // Get current time
                $time = time();
@@ -254,7 +254,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
                                // Now, is that attempt within parameters?
                                if ((time() - $time) >= $timeout) {
                                        // Didn't work within timeout
-                                       $isConnected = false;
+                                       $isConnected = FALSE;
                                        break;
                                } // END - if
 
@@ -262,13 +262,13 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
                                $this->idle(1000);
                        } elseif ($socketError != 0) {
                                // Stop on everything else pronto
-                               $isConnected = false;
+                               $isConnected = FALSE;
                                break;
                        }
                } // END - while
 
                // Is the peer connected?
-               if ($isConnected === true) {
+               if ($isConnected === TRUE) {
                        // Connection is fully established here, so change the state.
                        PeerStateFactory::createPeerStateInstanceByName('connected', $this);
                } else {
@@ -330,7 +330,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
        private function getRawDataFromPackageArray (array $packageData) {
                // Implode the package data array and fragement the resulting string, returns the final hash
                $finalHash = $this->getFragmenterInstance()->fragmentPackageArray($packageData, $this);
-               if ($finalHash !== true) {
+               if ($finalHash !== TRUE) {
                        $this->currentFinalHash = $finalHash;
                } // END - if
 
@@ -421,7 +421,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
                $sentBytes = 0;
 
                // Deliver all data
-               while ($sentBytes !== false) {
+               while ($sentBytes !== FALSE) {
                        // And deliver it
                        //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-HELPER[' . __LINE__ . ']: Sending out ' . strlen($encodedData) . ' bytes,bufferSize=' . $bufferSize . ',diff=' . $this->diff);
 
@@ -436,7 +436,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
                        }
 
                        // If there was an error, we don't continue here
-                       if ($sentBytes === false) {
+                       if ($sentBytes === FALSE) {
                                // Handle the error with a faked recipientData array
                                $this->handleSocketError(__METHOD__, __LINE__, $socketResource, array('0.0.0.0', '0'));
 
@@ -481,7 +481,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
         */
        protected final function markConnectionShuttedDown () {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-HELPER[' . __LINE__ . ']: ' . $this->__toString() . ' has been marked as shutted down');
-               $this->shuttedDown = true;
+               $this->shuttedDown = TRUE;
 
                // And remove the (now invalid) socket
                $this->setSocketResource(false);
index 0fbfee3739b5ba4c0b21f6fe29665f083141d14a..23ba71baf391746dcf9c30ff877deb36233ff2a3 100644 (file)
@@ -101,7 +101,7 @@ class TcpConnectionHelper extends BaseConnectionHelper implements ConnectionHelp
                                $recipientData[0] = ConsoleTools::determineExternalIp();
 
                                // Do we have hostname:ip match?
-                               if (strpos($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT], ':') === false) {
+                               if (strpos($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT], ':') === FALSE) {
                                        // No hostname:ip!
                                        $helperInstance->debugInstance($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ' does not contain ":". Please fix this.');
                                } // END - if
index 6651198a5b7e7ad6144b3beabad770c3c547b54a..250081235b77041d9622aabc5deb59b96d89cf19 100644 (file)
@@ -51,7 +51,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
        /**
         * Whether we are in blocking or non-blocking mode (default: non-blocking
         */
-       private $blockingMode = false;
+       private $blockingMode = FALSE;
 
        /**
         * A peer pool instance
@@ -80,7 +80,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
                $isServerSocket = ((is_resource($socketResource)) && (!@socket_getpeername($socketResource, $peerName)));
 
                // We need to clear the error here if it is a resource
-               if ($isServerSocket === true) {
+               if ($isServerSocket === TRUE) {
                        // Clear the error
                        //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[]=' . gettype($socketResource));
                        socket_clear_error($socketResource);
index 512976016602cf1c5c147b477c717c9228b0bc67..9324cf1fcdbf5688b9ea1c9208718368b3ed5d18 100644 (file)
@@ -46,7 +46,7 @@ while (count($clients) > 0) {
                $data = @socket_read($read_sock, 1024, PHP_NORMAL_READ);
 
                // check if the client is disconnected
-               if (($data === false) || (in_array(strtolower(trim($data)), $leaving))) {
+               if (($data === FALSE) || (in_array(strtolower(trim($data)), $leaving))) {
 
                        // remove client for $clients array
                        $key = array_search($read_sock, $clients);
index e1b3681a8f2cd24c926f43a7190794201789e3f9..1b052c5b909073397a5c4135d050f209078b1522 100644 (file)
@@ -55,17 +55,17 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         * Whether this node is anncounced (KEEP ON false!)
         * @deprecated
         */
-       private $hubIsAnnounced = false;
+       private $hubIsAnnounced = FALSE;
 
        /**
         * Whether this hub is active (default: false)
         */
-       private $isActive = false;
+       private $isActive = FALSE;
 
        /**
         * Whether this node accepts announcements (default: false)
         */
-       private $acceptAnnouncements = false;
+       private $acceptAnnouncements = FALSE;
 
        /**
         * Protected constructor
@@ -207,7 +207,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         */
        protected function ifAddressMatchesBootstrappingNodes ($remoteAddr) {
                // By default nothing is found
-               $isFound = false;
+               $isFound = FALSE;
 
                // Run through all configured IPs
                foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPARATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $ipPort) {
@@ -217,7 +217,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                        // Does it match?
                        if ($ipPortArray[0] == $remoteAddr) {
                                // Found it!
-                               $isFound = true;
+                               $isFound = TRUE;
 
                                // Remember the port number
                                $this->bootIpPort = $ipPort;
@@ -232,7 +232,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                                 * IP matches listen address. At this point we really don't care
                                 * if we can really listen on that address
                                 */
-                               $isFound = true;
+                               $isFound = TRUE;
 
                                // Remember the port number
                                $this->bootIpPort = $ipPort;
@@ -453,7 +453,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         */
        public function announceToUpperNodes (Taskable $taskInstance) {
                // Is this hub node announced?
-               if ($this->hubIsAnnounced === true) {
+               if ($this->hubIsAnnounced === TRUE) {
                        // Already announced!
                        throw new NodeAlreadyAnnouncedException($this, self::EXCEPTION_HUB_ALREADY_ANNOUNCED);
                } // END - if
@@ -621,7 +621,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         * @param       $isActive       Whether the hub is active
         * @return      void
         */
-       public final function enableIsActive ($isActive = true) {
+       public final function enableIsActive ($isActive = TRUE) {
                $this->isActive = (bool) $isActive;
        }
 
@@ -632,7 +632,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         */
        public final function isAcceptingAnnouncements () {
                // Check it (this node must be active and not shutdown!)
-               $acceptAnnouncements = (($this->acceptAnnouncements === true) && ($this->isNodeActive()));
+               $acceptAnnouncements = (($this->acceptAnnouncements === TRUE) && ($this->isNodeActive()));
 
                // Return it
                return $acceptAnnouncements;
@@ -684,7 +684,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         * @param       $acceptAnnouncements    Whether this node accepts announcements (default: true)
         * @return      void
         */
-       protected final function enableAcceptingAnnouncements ($acceptAnnouncements = true) {
+       protected final function enableAcceptingAnnouncements ($acceptAnnouncements = TRUE) {
                $this->acceptAnnouncements = $acceptAnnouncements;
        }
 
index 898eb798c2cd4cf50542f8c1b2915f439218d4f4..8202882765292c418c6ab15400a602488d66d413 100644 (file)
@@ -280,7 +280,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         * @param       $forceReInit    Whether to force reinitialization of all stacks
         * @return      void
         */
-       protected function initStackers ($forceReInit = false) {
+       protected function initStackers ($forceReInit = FALSE) {
                // Initialize all
                foreach (
                        array(
index 7214942cf8e8f5d3d18fb8b9d755388b64272578..519537af5219e934b584b30008ecd104f118c5f4 100644 (file)
@@ -178,7 +178,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
                $isProcessed = (
                        (isset($this->processedPackages[$index]))
                                &&
-                       ($this->processedPackages[$index] === true)
+                       ($this->processedPackages[$index] === TRUE)
                );
 
                // Return it
@@ -193,7 +193,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
         */
        private function markPackageDataProcessed (array $packageData) {
                // Remember it (until we may remove it)
-               $this->processedPackages[$this->getProcessedPackagesIndex($packageData)] = true;
+               $this->processedPackages[$this->getProcessedPackagesIndex($packageData)] = TRUE;
        }
 
        /**
@@ -491,7 +491,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
                        $current = $this->getCurrentChunkPointer($finalHash);
                } catch (AssertionException $e) {
                        // This may happen when the final hash is true
-                       if ($finalHash === true) {
+                       if ($finalHash === TRUE) {
                                // Set current to null
                                $current = NULL;
                        } else {
index c7ee45d91438a640194a4cbf9fa1717b76cf1ce9..f872b76aa464038bba093884769e2a36cdfc1402 100644 (file)
@@ -218,7 +218,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
         */
        public function getSocketFromPackageData (array $packageData, $connectionType = NULL) {
                // Default is no socket
-               $socketResource = false;
+               $socketResource = FALSE;
 
                // Temporary resolve recipient field
                $recipientIpArray = explode(':', HubTools::resolveSessionId($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]));
index cf144a95da5e680dd3469d3b3283ed91e1bc59a3..4c786b3f9b61b8fa2972b4e9e9d1013ffbdfd752 100644 (file)
@@ -116,7 +116,7 @@ class ConnectionRegistry extends BaseRegistry implements Register, RegisterableC
         */
        public function isConnectionRegistered (ConnectionHelper $connectionInstance, $socketResource) {
                // Default is not registered
-               $isRegistered = false;
+               $isRegistered = FALSE;
 
                // First, check for the instance, there can be only once
                if ($this->isProtocolRegistered($connectionInstance)) {
index a293fb06cf3f5b16bffde44ee427cfd765fcd800..b75c78204ad76a89782e70d32b911e72322f9f9b 100644 (file)
@@ -142,7 +142,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ':protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - ENTERED!');
 
                // Default is not registered
-               $isRegistered = false;
+               $isRegistered = FALSE;
 
                // First, check for the instance, there can be only once
                if ($this->isProtocolRegistered($protocolInstance)) {
index 7bb7c53942fae33b994c9b624422a44a04990dcd..199f1251fc41afa0d34e8f44bf15f21981d3d870 100644 (file)
@@ -52,7 +52,7 @@ class HubConsoleCommandResolver extends BaseCommandResolver implements CommandRe
                if (empty($commandName)) {
                        // Then thrown an exception here
                        throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
-               } elseif ($resolverInstance->isCommandValid($commandName) === false) {
+               } elseif ($resolverInstance->isCommandValid($commandName) === FALSE) {
                        // Invalid command found
                        throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);
                }
@@ -87,7 +87,7 @@ class HubConsoleCommandResolver extends BaseCommandResolver implements CommandRe
                if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_console_command');
 
                // Check if command is valid
-               if ($this->isCommandValid($commandName) === false) {
+               if ($this->isCommandValid($commandName) === FALSE) {
                        // This command is invalid!
                        throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
                } // END - if
@@ -123,7 +123,7 @@ class HubConsoleCommandResolver extends BaseCommandResolver implements CommandRe
                if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_console_command');
 
                // Check if command is valid
-               if ($this->isCommandValid($commandName) === false) {
+               if ($this->isCommandValid($commandName) === FALSE) {
                        // This command is invalid!
                        throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
                }
index 2726ef33b2ed1687078f34cd17d2ef4912cc864d..f6f29e2afa111a2a5ec1d54a52ed3bb39f2bb910 100644 (file)
@@ -52,7 +52,7 @@ class HubConsoleControllerResolver extends BaseControllerResolver implements Con
                if (empty($controllerName)) {
                        // Then thrown an exception here
                        throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
-               } elseif ($resolverInstance->isControllerValid($controllerName) === false) {
+               } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) {
                        // Invalid command found
                        throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
                }
index 8dfc4f58b2d9d8c682b75df5bbea1a2119544a6e..cba643e259b7c98b03ee18c4b3733af8048338c4 100644 (file)
@@ -62,7 +62,7 @@ class HubHttpControllerResolver extends BaseControllerResolver implements Contro
                if (empty($controllerName)) {
                        // Then thrown an exception here
                        throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
-               } elseif ($resolverInstance->isControllerValid($controllerName) === false) {
+               } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) {
                        // Invalid command found
                        throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
                }
index 97995e271897923f86193bb62189f847b4b023d6..6ce89ebc3998a0e232ac05f5ba0a3a9867a5a4ab 100644 (file)
@@ -127,7 +127,7 @@ class BaseStateResolver extends BaseResolver {
         */
        public function isStateValid ($stateName) {
                // By default nothing shall be valid
-               $isValid = false;
+               $isValid = FALSE;
 
                // Is a state set?
                if (empty($stateName)) {
@@ -142,11 +142,11 @@ class BaseStateResolver extends BaseResolver {
                $this->setClassName($className);
 
                // Try it hard to get an state
-               while ($isValid === false) {
+               while ($isValid === FALSE) {
                        // Is this class already loaded?
                        if (class_exists($this->getClassName())) {
                                // This class does exist. :-)
-                               $isValid = true;
+                               $isValid = TRUE;
                        } elseif ($this->getClassName() != $this->statePrefix . 'DefaultState') {
                                // Set default state
                                $this->setClassName($this->statePrefix . 'DefaultState');
index 1202b317fb7823dbb37a00c61e5a2c90ed041bc7..dfaeb8a31d767652861da331da0662c5d986d3db 100644 (file)
--- a/index.php
+++ b/index.php
@@ -42,7 +42,7 @@ final class ApplicationEntryPoint {
         * @return      void
         * @todo        This method is old code and needs heavy rewrite and should be moved to ApplicationHelper
         */
-       public static final function app_exit ($message = '', $code = false, $extraData = '', $silentMode = false) {
+       public static final function app_exit ($message = '', $code = FALSE, $extraData = '', $silentMode = FALSE) {
                // Is this method already called?
                if (isset($GLOBALS['app_die_called'])) {
                        // Then output the text directly
@@ -50,7 +50,7 @@ final class ApplicationEntryPoint {
                } // END - if
 
                // This method shall not be called twice
-               $GLOBALS['app_die_called'] = true;
+               $GLOBALS['app_die_called'] = TRUE;
 
                // Is a message set?
                if (empty($message)) {
@@ -62,7 +62,7 @@ final class ApplicationEntryPoint {
                $configInstance = FrameworkConfiguration::getSelfInstance();
 
                // Do we have debug installation?
-               if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === true)) {
+               if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === TRUE)) {
                        // Abort here
                        exit();
                } // END - if