From: Roland Häder Date: Sat, 24 Mar 2012 08:27:37 +0000 (+0000) Subject: Fixed a typo, added an assert() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dfe38c5c2ff89adebea4f61364eb556a83da35a3;p=hub.git Fixed a typo, added an assert() --- diff --git a/application/hub/interfaces/chat/class_Chatter.php b/application/hub/interfaces/chat/class_Chatter.php index ee00bc1d8..80d65a059 100644 --- a/application/hub/interfaces/chat/class_Chatter.php +++ b/application/hub/interfaces/chat/class_Chatter.php @@ -58,9 +58,9 @@ interface Chatter extends FrameworkInterface { function enableIsActive ($isActive = true); /** - * Determines wether the chatter is active + * Determines whether the chatter is active * - * @return $isActive Wether the chatter is active + * @return $isActive Whether the chatter is active */ function isActive (); } diff --git a/application/hub/interfaces/cruncher/class_CruncherHelper.php b/application/hub/interfaces/cruncher/class_CruncherHelper.php index b5fafe4f7..9bd847e29 100644 --- a/application/hub/interfaces/cruncher/class_CruncherHelper.php +++ b/application/hub/interfaces/cruncher/class_CruncherHelper.php @@ -67,9 +67,9 @@ interface CruncherHelper extends FrameworkInterface { function enableIsActive ($isActive = true); /** - * Determines wether the cruncher is active + * Determines whether the cruncher is active * - * @return $isActive Wether the cruncher is active + * @return $isActive Whether the cruncher is active */ function isActive (); diff --git a/application/hub/interfaces/handler/network/class_Networkable.php b/application/hub/interfaces/handler/network/class_Networkable.php index adea6832e..bb786188e 100644 --- a/application/hub/interfaces/handler/network/class_Networkable.php +++ b/application/hub/interfaces/handler/network/class_Networkable.php @@ -33,9 +33,9 @@ interface Networkable extends Handleable { function processRawDataFromResource ($resource); /** - * Checks wether decoded data is pending for further processing. + * Checks whether decoded data is pending for further processing. * - * @return $isPending Wether decoded data is pending + * @return $isPending Whether decoded data is pending */ function isDecodedDataPending (); diff --git a/application/hub/interfaces/handler/task/class_HandleableTask.php b/application/hub/interfaces/handler/task/class_HandleableTask.php index 3fb432dd0..38600ddec 100644 --- a/application/hub/interfaces/handler/task/class_HandleableTask.php +++ b/application/hub/interfaces/handler/task/class_HandleableTask.php @@ -33,9 +33,9 @@ interface HandleableTask extends Handleable { function registerTask ($taskName, Visitable $taskInstance); /** - * Checks wether tasks are left including idle task. + * Checks whether tasks are left including idle task. * - * @return $tasksLeft Wether there are tasks left to handle + * @return $tasksLeft Whether there are tasks left to handle */ function hasTasksLeft (); diff --git a/application/hub/interfaces/listener/class_Listenable.php b/application/hub/interfaces/listener/class_Listenable.php index 05782bb3a..f1eb6f163 100644 --- a/application/hub/interfaces/listener/class_Listenable.php +++ b/application/hub/interfaces/listener/class_Listenable.php @@ -37,10 +37,10 @@ interface Listenable extends ProtocolHandler { function doListen(); /** - * Checks wether the listener would accept the given package data array + * Checks whether the listener would accept the given package data array * * @param $packageData Raw package data - * @return $accepts Wether this listener does accept + * @return $accepts Whether this listener does accept */ function ifListenerAcceptsPackageData (array $packageData); diff --git a/application/hub/interfaces/lists/class_Listable.php b/application/hub/interfaces/lists/class_Listable.php index 0ad651960..39ae13398 100644 --- a/application/hub/interfaces/lists/class_Listable.php +++ b/application/hub/interfaces/lists/class_Listable.php @@ -23,10 +23,10 @@ */ interface Listable extends FrameworkInterface, IteratorAggregate { /** - * Checks wether the given group is set + * Checks whether the given group is set * * @param $groupName Group to check if found in list - * @return $isset Wether the group is valid + * @return $isset Whether the group is valid */ function isGroupSet ($groupName); diff --git a/application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php b/application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php index 5adc94dae..cd30a6dc3 100644 --- a/application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php +++ b/application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php @@ -23,10 +23,10 @@ */ interface LookupablePeerState extends Lookupable { /** - * Checks wether given 'sender' is a new peer + * Checks whether given 'sender' is a new peer * * @param $packageData Raw package data - * @return $isNewPeer Wether 'sender' is a new peer to this node + * @return $isNewPeer Whether 'sender' is a new peer to this node */ function isSenderNewPeer (array $packageData); @@ -57,12 +57,12 @@ interface LookupablePeerState extends Lookupable { function purgeOldEntriesBySocketResource ($socketResource); /** - * Checks wether a given peer state (in helper instance) is same as stored + * Checks whether a given peer state (in helper instance) is same as stored * in database compared with the one from $helperInstance. * * @param $helperInstance An instance of a ConnectionHelper class * @param $packageData Valid package data array - * @return $isSamePeerState Wether the peer's state is the same + * @return $isSamePeerState Whether the peer's state is the same */ function isSamePeerState (ConnectionHelper $helperInstance, array $packageData); } diff --git a/application/hub/interfaces/package/class_Deliverable.php b/application/hub/interfaces/package/class_Deliverable.php index 6da180133..d38f4504c 100644 --- a/application/hub/interfaces/package/class_Deliverable.php +++ b/application/hub/interfaces/package/class_Deliverable.php @@ -33,23 +33,23 @@ interface Deliverable extends FrameworkInterface { function enqueueRawDataFromTemplate (HelpableHub $helperInstance, NodeHelper $nodeInstance); /** - * Checks wether a package has been enqueued for delivery. + * Checks whether a package has been enqueued for delivery. * - * @return $isEnqueued Wether a package is enqueued + * @return $isEnqueued Whether a package is enqueued */ function isPackageEnqueued (); /** - * Checks wether a package has been declared + * Checks whether a package has been declared * - * @return $isDeclared Wether a package is declared + * @return $isDeclared Whether a package is declared */ function isPackageDeclared (); /** - * Checks wether a package should be sent out + * Checks whether a package should be sent out * - * @return $isWaitingDelivery Wether a package is waiting for delivery + * @return $isWaitingDelivery Whether a package is waiting for delivery */ function isPackageWaitingForDelivery (); diff --git a/application/hub/interfaces/package/class_Receivable.php b/application/hub/interfaces/package/class_Receivable.php index adc15b112..b6034b048 100644 --- a/application/hub/interfaces/package/class_Receivable.php +++ b/application/hub/interfaces/package/class_Receivable.php @@ -23,10 +23,10 @@ */ interface Receivable extends FrameworkInterface { /** - * Checks wether new raw data from the socket has arrived + * Checks whether new raw data from the socket has arrived * * @param $poolInstance An instance of a PoolableListener class - * @return $hasArrived Wether raw package data has arrived at a socket + * @return $hasArrived Whether raw package data has arrived at a socket */ function isNewRawDataPending (PoolableListener $poolInstance); @@ -40,9 +40,9 @@ interface Receivable extends FrameworkInterface { function handleIncomingDecodedData (); /** - * Checks wether incoming decoded data is handled. + * Checks whether incoming decoded data is handled. * - * @return $isHandled Wether incoming decoded data is handled + * @return $isHandled Whether incoming decoded data is handled */ function isIncomingDecodedDataHandled (); @@ -55,9 +55,9 @@ interface Receivable extends FrameworkInterface { function assembleDecodedDataToPackage (); /** - * Checks wether a new package has arrived + * Checks whether a new package has arrived * - * @return $hasArrived Wether a new package has arrived for processing + * @return $hasArrived Whether a new package has arrived for processing */ function isNewPackageArrived (); diff --git a/application/hub/interfaces/tags/class_Tagable.php b/application/hub/interfaces/tags/class_Tagable.php index 9fd39c39c..181c4c87b 100644 --- a/application/hub/interfaces/tags/class_Tagable.php +++ b/application/hub/interfaces/tags/class_Tagable.php @@ -31,11 +31,11 @@ interface Tagable extends FrameworkInterface { function chooseProtocolFromPackageData (array $packageData); /** - * Checks wether the given package data is accepted by the listener + * Checks whether the given package data is accepted by the listener * * @param $packageData Raw package data * @param $listenerInstance A Listenable instance - * @return $accepts Wether it is accepted + * @return $accepts Whether it is accepted */ function ifPackageDataIsAcceptedByListener (array $packageData, Listenable $listenerInstance); } diff --git a/application/hub/main/chat/class_BaseNodeChat.php b/application/hub/main/chat/class_BaseNodeChat.php index 99d47ba0b..7e8f2a26a 100644 --- a/application/hub/main/chat/class_BaseNodeChat.php +++ b/application/hub/main/chat/class_BaseNodeChat.php @@ -23,7 +23,7 @@ */ class BaseNodeChat extends BaseHubSystem { /** - * Wether this Chatter is active + * Whether this Chatter is active */ private $isActive = false; @@ -49,9 +49,9 @@ class BaseNodeChat extends BaseHubSystem { } /** - * Determines wether the chatter is active + * Determines whether the chatter is active * - * @return $isActive Wether the chatter is active + * @return $isActive Whether the chatter is active */ public final function isActive () { return $this->isActive; diff --git a/application/hub/main/cruncher/class_BaseHubCruncher.php b/application/hub/main/cruncher/class_BaseHubCruncher.php index d45ca1632..3607588ed 100644 --- a/application/hub/main/cruncher/class_BaseHubCruncher.php +++ b/application/hub/main/cruncher/class_BaseHubCruncher.php @@ -81,10 +81,10 @@ abstract class BaseHubCruncher extends BaseHubSystem implements Updateable { } /** - * Checks wether the in-buffer queue is filled by comparing it's current + * Checks whether the in-buffer queue is filled by comparing it's current * amount of entries against a threshold. * - * @return $isFilled Wether the in-buffer is filled + * @return $isFilled Whether the in-buffer is filled */ protected function isInBufferQueueFilled () { // Determine it @@ -126,9 +126,9 @@ abstract class BaseHubCruncher extends BaseHubSystem implements Updateable { } /** - * Determines wether the cruncher is active + * Determines whether the cruncher is active * - * @return $isActive Wether the cruncher is active + * @return $isActive Whether the cruncher is active */ public final function isActive () { return $this->isActive; diff --git a/application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php b/application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php index 4ffca6783..f70200238 100644 --- a/application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php +++ b/application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php @@ -82,11 +82,11 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look } /** - * Checks wether given 'sender' is a new peer + * Checks whether given 'sender' is a new peer * * @param $packageData Raw package data * @param $dataSetInstance An optional instance of a StoreableCriteria class - * @return $isNewPeer Wether 'sender' is a new peer to this peer + * @return $isNewPeer Whether 'sender' is a new peer to this peer */ public function isSenderNewPeer (array $packageData, StoreableCriteria $dataSetInstance = NULL) { // Debug message @@ -233,12 +233,12 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look } /** - * Checks wether a given peer state (in helper instance) is same as stored + * Checks whether a given peer state (in helper instance) is same as stored * in database compared with the one from $helperInstance. * * @param $helperInstance An instance of a ConnectionHelper class * @param $packageData Valid package data array - * @return $isSamePeerState Wether the peer's state is the same + * @return $isSamePeerState Whether the peer's state is the same */ public function isSamePeerState (ConnectionHelper $helperInstance, array $packageData) { // Debug message diff --git a/application/hub/main/discovery/socket/class_PackageSocketDiscovery.php b/application/hub/main/discovery/socket/class_PackageSocketDiscovery.php index d08dbb3f2..d48b5a5e9 100644 --- a/application/hub/main/discovery/socket/class_PackageSocketDiscovery.php +++ b/application/hub/main/discovery/socket/class_PackageSocketDiscovery.php @@ -66,7 +66,7 @@ class PackageSocketDiscovery extends BaseHubDiscovery implements DiscoverableSoc $listenerInstance = NULL; /* - * Now we need to choose again. It is wether we are speaking with a hub + * Now we need to choose again. It is whether we are speaking with a hub * or with a client. So just handle it over to all listeners in this * pool. */ diff --git a/application/hub/main/handler/chunks/class_ChunkHandler.php b/application/hub/main/handler/chunks/class_ChunkHandler.php index 2887610b4..a0d0bfcac 100644 --- a/application/hub/main/handler/chunks/class_ChunkHandler.php +++ b/application/hub/main/handler/chunks/class_ChunkHandler.php @@ -241,9 +241,8 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable * collisions) the content is the same as the sender sends it to this * peer. * - * And also the serial number is valid (basicly) at this point. - * - * Now the chunk can be added to the final array + * And also the serial number is valid (basicly) at this point. Now the + * chunk can be added to the final array. */ $this->addChunkToFinalArray($chunkSplits); @@ -271,7 +270,7 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable * Assembles all chunks (except EOP and "hash chunk") back together to the original package data. * * This is done by the following steps: - * +* * 1) Sort the final array with ksort(). This will bring the "hash * chunk" up to the last array index and the EOP chunk to the * pre-last array index @@ -283,6 +282,9 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable * @return void */ public function assembleChunksFromFinalArray () { + // Make sure the final array is really completed + assert($this->ifUnassembledChunksAvailable()); + $this->partialStub('Please implement this method.'); } } diff --git a/application/hub/main/handler/network/class_BaseRawDataHandler.php b/application/hub/main/handler/network/class_BaseRawDataHandler.php index f35d7d52b..ee748f76f 100644 --- a/application/hub/main/handler/network/class_BaseRawDataHandler.php +++ b/application/hub/main/handler/network/class_BaseRawDataHandler.php @@ -115,9 +115,9 @@ class BaseRawDataHandler extends BaseHandler { } /** - * Checks wether decoded data is pending for further processing. + * Checks whether decoded data is pending for further processing. * - * @return $isPending Wether decoded data is pending + * @return $isPending Whether decoded data is pending */ public function isDecodedDataPending () { // Does the stacker have some entries (not empty)? @@ -141,11 +141,11 @@ class BaseRawDataHandler extends BaseHandler { } /** - * Checks wether the 'recipient' field matches our own address:port + * Checks whether the 'recipient' field matches our own address:port * combination. * * @param $packageData Raw package data - * @return $matches Wether it matches + * @return $matches Whether it matches * @todo This method will be moved to a better place */ protected function ifRecipientMatchesOwnAddress (array $packageData) { diff --git a/application/hub/main/handler/tasks/class_TaskHandler.php b/application/hub/main/handler/tasks/class_TaskHandler.php index c936419f8..b413ab7ba 100644 --- a/application/hub/main/handler/tasks/class_TaskHandler.php +++ b/application/hub/main/handler/tasks/class_TaskHandler.php @@ -187,11 +187,11 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask { $taskEntry = array( // Identifier for the generateHash() method 'id' => $taskName, - // Wether the task is started + // Whether the task is started 'task_started' => false, - // Wether the task is paused (not yet implemented) + // Whether the task is paused (not yet implemented) 'task_paused' => false, - // Wether the task can be paused (not yet implemented) + // Whether the task can be paused (not yet implemented) 'task_pauseable' => true, // Timestamp of registration 'task_registered' => $this->getMilliTime(), @@ -222,9 +222,9 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask { } /** - * Checks wether tasks are left including idle task + * Checks whether tasks are left including idle task * - * @return $tasksLeft Wether there are tasks left to handle + * @return $tasksLeft Whether there are tasks left to handle */ public function hasTasksLeft () { // Do we have tasks there? diff --git a/application/hub/main/helper/connection/class_BaseConnectionHelper.php b/application/hub/main/helper/connection/class_BaseConnectionHelper.php index a98242238..f66bc15c6 100644 --- a/application/hub/main/helper/connection/class_BaseConnectionHelper.php +++ b/application/hub/main/helper/connection/class_BaseConnectionHelper.php @@ -56,7 +56,7 @@ class BaseConnectionHelper extends BaseHubHelper implements Registerable, Protoc private $isInitialized = false; /** - * Wether this connection is shutted down + * Whether this connection is shutted down */ private $shuttedDown = false; @@ -205,7 +205,7 @@ class BaseConnectionHelper extends BaseHubHelper implements Registerable, Protoc * recipientData array with currently configured timeout. * * @param $recipientData A valid recipient data array, 0=IP; 1=PORT - * @return $isConnected Wether the connection went fine + * @return $isConnected Whether the connection went fine * @see Please see http://de.php.net/manual/en/function.socket-connect.php#84465 for original code * @todo Rewrite the while() loop to a iterator to not let the software stay very long here */ @@ -439,7 +439,7 @@ class BaseConnectionHelper extends BaseHubHelper implements Registerable, Protoc /** * Getter for shuttedDown * - * @return $shuttedDown Wether this connection is shutted down + * @return $shuttedDown Whether this connection is shutted down */ public final function isShuttedDown () { /* NOISY-DEBUG: */ $this->debugOutput('CONNECTION: ' . $this->__toString() . ',shuttedDown=' . intval($this->shuttedDown)); diff --git a/application/hub/main/iterator/hub/class_HubPingIterator.php b/application/hub/main/iterator/hub/class_HubPingIterator.php index ea605265e..3aca0f56a 100644 --- a/application/hub/main/iterator/hub/class_HubPingIterator.php +++ b/application/hub/main/iterator/hub/class_HubPingIterator.php @@ -94,7 +94,7 @@ class HubPingIterator extends BaseIterator implements Iterator { } /** - * Checks wether the current entry is valid (not at the end of the list) + * Checks whether the current entry is valid (not at the end of the list) * * @return void */ diff --git a/application/hub/main/iterator/network/class_NetworkListenIterator.php b/application/hub/main/iterator/network/class_NetworkListenIterator.php index 00e031a66..dcf83cb03 100644 --- a/application/hub/main/iterator/network/class_NetworkListenIterator.php +++ b/application/hub/main/iterator/network/class_NetworkListenIterator.php @@ -107,9 +107,9 @@ class NetworkListenIterator extends BaseIterator implements Iterator { } /** - * Checks wether the current entry is valid (not at the end of the list) + * Checks whether the current entry is valid (not at the end of the list) * - * @return $isValid Wether the current entry is there + * @return $isValid Whether the current entry is there */ public function valid () { // Check for total active peers and if we are not at the end diff --git a/application/hub/main/iterator/pool/class_DefaultIterator.php b/application/hub/main/iterator/pool/class_DefaultIterator.php index 527448837..130bd494b 100644 --- a/application/hub/main/iterator/pool/class_DefaultIterator.php +++ b/application/hub/main/iterator/pool/class_DefaultIterator.php @@ -105,9 +105,9 @@ class DefaultIterator extends BaseIterator implements Iterator { } /** - * Checks wether the current entry is valid (not at the end of the list) + * Checks whether the current entry is valid (not at the end of the list) * - * @return $isValid Wether the current entry is there + * @return $isValid Whether the current entry is there */ public function valid () { // Check for total active peers and if we are not at the end diff --git a/application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php b/application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php index 0f27de509..a735e3c36 100644 --- a/application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php +++ b/application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php @@ -107,9 +107,9 @@ class HandlerPoolIterator extends BaseIterator implements Iterator { } /** - * Checks wether the current entry is valid (not at the end of the list) + * Checks whether the current entry is valid (not at the end of the list) * - * @return $isValid Wether the current entry is there + * @return $isValid Whether the current entry is there */ public function valid () { // Check for total active peers and if we are not at the end diff --git a/application/hub/main/iterator/pool/monitor/class_MonitorPoolIterator.php b/application/hub/main/iterator/pool/monitor/class_MonitorPoolIterator.php index c58ba6247..8cc9ad078 100644 --- a/application/hub/main/iterator/pool/monitor/class_MonitorPoolIterator.php +++ b/application/hub/main/iterator/pool/monitor/class_MonitorPoolIterator.php @@ -107,9 +107,9 @@ class MonitorPoolIterator extends BaseIterator implements Iterator, Registerable } /** - * Checks wether the current entry is valid (not at the end of the list) + * Checks whether the current entry is valid (not at the end of the list) * - * @return $isValid Wether the current entry is there + * @return $isValid Whether the current entry is there */ public function valid () { // Check for total active peers and if we are not at the end diff --git a/application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php b/application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php index 7001854bf..8d109171f 100644 --- a/application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php +++ b/application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php @@ -105,9 +105,9 @@ class ShutdownPoolIterator extends BaseIterator implements Iterator { } /** - * Checks wether the current entry is valid (not at the end of the list) + * Checks whether the current entry is valid (not at the end of the list) * - * @return $isValid Wether the current entry is there + * @return $isValid Whether the current entry is there */ public function valid () { // Check for total active peers and if we are not at the end diff --git a/application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php b/application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php index 60ea2d0e2..ab110b5df 100644 --- a/application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php +++ b/application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php @@ -107,9 +107,9 @@ class TaskPoolIterator extends BaseIterator implements Iterator, Registerable { } /** - * Checks wether the current entry is valid (not at the end of the list) + * Checks whether the current entry is valid (not at the end of the list) * - * @return $isValid Wether the current entry is there + * @return $isValid Whether the current entry is there */ public function valid () { // Check for total active peers and if we are not at the end diff --git a/application/hub/main/iterator/producer/keys/class_TestUnitKeyProducerIterator.php b/application/hub/main/iterator/producer/keys/class_TestUnitKeyProducerIterator.php index 77501e46f..277e35b6f 100644 --- a/application/hub/main/iterator/producer/keys/class_TestUnitKeyProducerIterator.php +++ b/application/hub/main/iterator/producer/keys/class_TestUnitKeyProducerIterator.php @@ -124,7 +124,7 @@ class TestUnitKeyProducerIterator extends BaseIterator implements Iterator { } /** - * Checks wether the current entry is valid (not at the end of the list) + * Checks whether the current entry is valid (not at the end of the list) * * @return void */ diff --git a/application/hub/main/listener/class_BaseListener.php b/application/hub/main/listener/class_BaseListener.php index 6b5821919..fdae47c8d 100644 --- a/application/hub/main/listener/class_BaseListener.php +++ b/application/hub/main/listener/class_BaseListener.php @@ -48,7 +48,7 @@ class BaseListener extends BaseHubSystem implements Visitable { private $listenPort = 0; // This port MUST be changed by your application /** - * Wether we are in blocking or non-blocking mode (default: non-blocking + * Whether we are in blocking or non-blocking mode (default: non-blocking */ private $blockingMode = false; @@ -69,10 +69,10 @@ class BaseListener extends BaseHubSystem implements Visitable { } /** - * Checks wether the given socket resource is a server socket + * Checks whether the given socket resource is a server socket * * @param $socketResource A valid socket resource - * @return $isServerSocket Wether the socket resource is a server socket + * @return $isServerSocket Whether the socket resource is a server socket */ protected function isServerSocketResource ($socketResource) { // Check it @@ -181,7 +181,7 @@ class BaseListener extends BaseHubSystem implements Visitable { /** * Setter for blocking-mode * - * @param $blockingMode Wether blocking-mode is disabled (default) or enabled + * @param $blockingMode Whether blocking-mode is disabled (default) or enabled * @return void */ protected final function setBlockingMode ($blockingMode) { @@ -189,9 +189,9 @@ class BaseListener extends BaseHubSystem implements Visitable { } /** - * Checks wether blocking-mode is enabled or disabled + * Checks whether blocking-mode is enabled or disabled * - * @return $blockingMode Wether blocking mode is disabled or enabled + * @return $blockingMode Whether blocking mode is disabled or enabled */ public final function isBlockingModeEnabled () { return $this->blockingMode; @@ -244,10 +244,10 @@ class BaseListener extends BaseHubSystem implements Visitable { } /** - * Checks wether given socket resource is registered in socket registry + * Checks whether given socket resource is registered in socket registry * * @param $socketResource A valid server socket resource - * @return $isRegistered Wether given server socket is registered + * @return $isRegistered Whether given server socket is registered */ protected function isServerSocketRegistered ($socketResource) { // Get a socket registry instance (singleton) diff --git a/application/hub/main/listener/tcp/class_TcpListener.php b/application/hub/main/listener/tcp/class_TcpListener.php index fea5cff83..7ecfb2567 100644 --- a/application/hub/main/listener/tcp/class_TcpListener.php +++ b/application/hub/main/listener/tcp/class_TcpListener.php @@ -268,10 +268,10 @@ class TcpListener extends BaseListener implements Listenable { } /** - * Checks wether the listener would accept the given package data array + * Checks whether the listener would accept the given package data array * * @param $packageData Raw package data - * @return $accepts Wether this listener does accept + * @return $accepts Whether this listener does accept */ public function ifListenerAcceptsPackageData (array $packageData) { $this->debugBackTrace('This call should not happen. Please report it.'); diff --git a/application/hub/main/listener/tcp/decorators/class_ClientTcpListenerDecorator.php b/application/hub/main/listener/tcp/decorators/class_ClientTcpListenerDecorator.php index f456e009d..dc8c95e67 100644 --- a/application/hub/main/listener/tcp/decorators/class_ClientTcpListenerDecorator.php +++ b/application/hub/main/listener/tcp/decorators/class_ClientTcpListenerDecorator.php @@ -75,10 +75,10 @@ class ClientTcpListenerDecorator extends BaseListenerDecorator implements Listen } /** - * Checks wether the listener would accept the given package data array + * Checks whether the listener would accept the given package data array * * @param $packageData Raw package data - * @return $accepts Wether this listener does accept + * @return $accepts Whether this listener does accept */ public function ifListenerAcceptsPackageData (array $packageData) { // Get a tags instance diff --git a/application/hub/main/listener/tcp/decorators/class_HubTcpListenerDecorator.php b/application/hub/main/listener/tcp/decorators/class_HubTcpListenerDecorator.php index 6b8184894..08d16e72e 100644 --- a/application/hub/main/listener/tcp/decorators/class_HubTcpListenerDecorator.php +++ b/application/hub/main/listener/tcp/decorators/class_HubTcpListenerDecorator.php @@ -75,10 +75,10 @@ class HubTcpListenerDecorator extends BaseListenerDecorator implements Listenabl } /** - * Checks wether the listener would accept the given package data array + * Checks whether the listener would accept the given package data array * * @param $packageData Raw package data - * @return $accepts Wether this listener does accept + * @return $accepts Whether this listener does accept */ public function ifListenerAcceptsPackageData (array $packageData) { // Get a tags instance diff --git a/application/hub/main/listener/udp/class_UdpListener.php b/application/hub/main/listener/udp/class_UdpListener.php index 5fac3aa4f..d3842e0f3 100644 --- a/application/hub/main/listener/udp/class_UdpListener.php +++ b/application/hub/main/listener/udp/class_UdpListener.php @@ -185,10 +185,10 @@ class UdpListener extends BaseListener implements Listenable { } /** - * Checks wether the listener would accept the given package data array + * Checks whether the listener would accept the given package data array * * @param $packageData Raw package data - * @return $accepts Wether this listener does accept + * @return $accepts Whether this listener does accept */ function ifListenerAcceptsPackageData (array $packageData) { $this->partialStub('This call should not happen. Please report it.'); diff --git a/application/hub/main/listener/udp/decorators/class_ClientUdpListenerDecorator.php b/application/hub/main/listener/udp/decorators/class_ClientUdpListenerDecorator.php index 6e6da327f..af0d9895b 100644 --- a/application/hub/main/listener/udp/decorators/class_ClientUdpListenerDecorator.php +++ b/application/hub/main/listener/udp/decorators/class_ClientUdpListenerDecorator.php @@ -75,10 +75,10 @@ class ClientUdpListenerDecorator extends BaseListenerDecorator implements Listen } /** - * Checks wether the listener would accept the given package data array + * Checks whether the listener would accept the given package data array * * @param $packageData Raw package data - * @return $accepts Wether this listener does accept + * @return $accepts Whether this listener does accept */ function ifListenerAcceptsPackageData (array $packageData) { // Get a tags instance diff --git a/application/hub/main/listener/udp/decorators/class_HubUdpListenerDecorator.php b/application/hub/main/listener/udp/decorators/class_HubUdpListenerDecorator.php index 9a611351f..2cfc4bcd4 100644 --- a/application/hub/main/listener/udp/decorators/class_HubUdpListenerDecorator.php +++ b/application/hub/main/listener/udp/decorators/class_HubUdpListenerDecorator.php @@ -75,10 +75,10 @@ class HubUdpListenerDecorator extends BaseListenerDecorator implements Listenabl } /** - * Checks wether the listener would accept the given package data array + * Checks whether the listener would accept the given package data array * * @param $packageData Raw package data - * @return $accepts Wether this listener does accept + * @return $accepts Whether this listener does accept */ public function ifListenerAcceptsPackageData (array $packageData) { // Get a tags instance diff --git a/application/hub/main/lists/class_BaseList.php b/application/hub/main/lists/class_BaseList.php index 3bc2933e3..5efe2baab 100644 --- a/application/hub/main/lists/class_BaseList.php +++ b/application/hub/main/lists/class_BaseList.php @@ -67,10 +67,10 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable { } /** - * Checks wether the given group is set + * Checks whether the given group is set * * @param $groupName Group to check if found in list - * @return $isset Wether the group is valid + * @return $isset Whether the group is valid */ public function isGroupSet ($groupName) { //* DEBUG: */ $this->debugOutput(__METHOD__.': '.$groupName); @@ -320,10 +320,10 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable { } /** - * Checks wether the given hash is valid + * Checks whether the given hash is valid * * @param $hash The hash we should validate - * @return $isValid Wether the given hash is valid + * @return $isValid Whether the given hash is valid */ public final function isHashValid ($hash) { // Check it diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index 61b9c2e9c..07974fad4 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -49,13 +49,13 @@ class BaseHubNode extends BaseHubSystem implements Updateable { private $queueConnectorInstance = NULL; /** - * Wether this node is anncounced (KEEP ON false!) + * Whether this node is anncounced (KEEP ON false!) * @deprecated */ private $hubIsAnnounced = false; /** - * Wether this hub is active + * Whether this hub is active */ private $isActive = false; @@ -174,10 +174,10 @@ class BaseHubNode extends BaseHubSystem implements Updateable { } /** - * Checks wether the given IP address matches one of the bootstrapping nodes + * Checks whether the given IP address matches one of the bootstrapping nodes * * @param $remoteAddr IP address to checkout against our bootstrapping list - * @return $isFound Wether the IP is found + * @return $isFound Whether the IP is found */ protected function ifAddressMatchesBootstrappingNodes ($remoteAddr) { // By default nothing is found @@ -489,7 +489,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable { * @return void */ public function activateNode (Requestable $requestInstance, Responseable $responseInstance) { - // Checks wether a listener is still active and shuts it down if one + // Checks whether a listener is still active and shuts it down if one // is still listening. if (($this->determineIfListenerIsActive()) && ($this->getIsActive())) { // Shutdown them down before they can hurt anything @@ -619,7 +619,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable { /** * Getter for isActive attribute * - * @return $isActive Wether the hub is active + * @return $isActive Whether the hub is active */ public final function getIsActive () { return $this->isActive; @@ -628,7 +628,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable { /** * Enables (default) or disables isActive flag * - * @param $isActive Wether the hub is active + * @param $isActive Whether the hub is active * @return void */ public final function enableIsActive ($isActive = true) { diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index f2fe68cd8..bd094561c 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -455,12 +455,12 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva } /** - * Checks wether a package has been enqueued for delivery. + * Checks whether a package has been enqueued for delivery. * - * @return $isEnqueued Wether a package is enqueued + * @return $isEnqueued Whether a package is enqueued */ public function isPackageEnqueued () { - // Check wether the stacker is not empty + // Check whether the stacker is not empty $isEnqueued = (($this->getStackerInstance()->isStackInitialized(self::STACKER_NAME_UNDECLARED)) && (!$this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_UNDECLARED))); // Return the result @@ -468,12 +468,12 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva } /** - * Checks wether a package has been declared + * Checks whether a package has been declared * - * @return $isDeclared Wether a package is declared + * @return $isDeclared Whether a package is declared */ public function isPackageDeclared () { - // Check wether the stacker is not empty + // Check whether the stacker is not empty $isDeclared = (($this->getStackerInstance()->isStackInitialized(self::STACKER_NAME_DECLARED)) && (!$this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_DECLARED))); // Return the result @@ -481,12 +481,12 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva } /** - * Checks wether a package should be sent out + * Checks whether a package should be sent out * - * @return $isWaitingDelivery Wether a package is waiting for delivery + * @return $isWaitingDelivery Whether a package is waiting for delivery */ public function isPackageWaitingForDelivery () { - // Check wether the stacker is not empty + // Check whether the stacker is not empty $isWaitingDelivery = (($this->getStackerInstance()->isStackInitialized(self::STACKER_NAME_OUTGOING)) && (!$this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_OUTGOING))); // Return the result @@ -594,12 +594,12 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva /////////////////////////////////////////////////////////////////////////// /** - * Checks wether decoded raw data is pending + * Checks whether decoded raw data is pending * - * @return $isPending Wether decoded raw data is pending + * @return $isPending Whether decoded raw data is pending */ private function isDecodedDataPending () { - // Just return wether the stack is not empty + // Just return whether the stack is not empty $isPending = (!$this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_DECODED_INCOMING)); // Return the status @@ -607,10 +607,10 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva } /** - * Checks wether new raw package data has arrived at a socket + * Checks whether new raw package data has arrived at a socket * * @param $poolInstance An instance of a PoolableListener class - * @return $hasArrived Wether new raw package data has arrived for processing + * @return $hasArrived Whether new raw package data has arrived for processing */ public function isNewRawDataPending (PoolableListener $poolInstance) { // Visit the pool. This monitors the pool for incoming raw data. @@ -691,9 +691,9 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva } /** - * Checks wether incoming decoded data is handled. + * Checks whether incoming decoded data is handled. * - * @return $isHandled Wether incoming decoded data is handled + * @return $isHandled Whether incoming decoded data is handled */ public function isIncomingDecodedDataHandled () { // Determine if the stack is not empty @@ -731,9 +731,9 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva } /** - * Checks wether a new package has arrived + * Checks whether a new package has arrived * - * @return $hasArrived Wether a new package has arrived for processing + * @return $hasArrived Whether a new package has arrived for processing */ public function isNewPackageArrived () { // @TODO Add some content here diff --git a/application/hub/main/package/fragmenter/class_PackageFragmenter.php b/application/hub/main/package/fragmenter/class_PackageFragmenter.php index 9b1b8d52d..81f63f242 100644 --- a/application/hub/main/package/fragmenter/class_PackageFragmenter.php +++ b/application/hub/main/package/fragmenter/class_PackageFragmenter.php @@ -165,10 +165,10 @@ class PackageFragmenter extends BaseFrameworkSystem implements Fragmentable, Reg } /** - * Checks wether the given package data is already processed by this fragmenter + * Checks whether the given package data is already processed by this fragmenter * * @param $packageData Raw package data array - * @return $isProcessed Wether the package has been fragmented + * @return $isProcessed Whether the package has been fragmented */ private function isPackageProcessed (array $packageData) { // Get array index diff --git a/application/hub/main/producer/class_BaseProducer.php b/application/hub/main/producer/class_BaseProducer.php index e69b83f7f..fc5ee32e7 100644 --- a/application/hub/main/producer/class_BaseProducer.php +++ b/application/hub/main/producer/class_BaseProducer.php @@ -137,10 +137,10 @@ abstract class BaseProducer extends BaseFrameworkSystem { } /** - * Checks wether a configurable out-going queue limit has been reached + * Checks whether a configurable out-going queue limit has been reached * * @param $configEntry Configuration entry where the limit is stored - * @return $isReached Wether the limit is reached + * @return $isReached Whether the limit is reached */ protected function isOutgoingQueueLimitReached($configEntry) { return ($this->getConfigInstance()->getConfigEntry($configEntry) <= $this->getOutgoingQueueInstance()->getStackCount('outgoing_queue')); @@ -166,10 +166,10 @@ abstract class BaseProducer extends BaseFrameworkSystem { } /** - * Checks wether a configurable incoming queue limit has been reached + * Checks whether a configurable incoming queue limit has been reached * * @param $configEntry Configuration entry where the limit is stored - * @return $isReached Wether the limit is reached + * @return $isReached Whether the limit is reached */ protected function isIncomingQueueLimitReached($configEntry) { return ($this->getConfigInstance()->getConfigEntry($configEntry) <= $this->getIncomingQueueInstance()->getStackCount('incoming_queue')); diff --git a/application/hub/main/registry/connection/class_ConnectionRegistry.php b/application/hub/main/registry/connection/class_ConnectionRegistry.php index ea124312c..3c6ce0bdf 100644 --- a/application/hub/main/registry/connection/class_ConnectionRegistry.php +++ b/application/hub/main/registry/connection/class_ConnectionRegistry.php @@ -90,10 +90,10 @@ class ConnectionRegistry extends BaseRegistry implements Register, RegisterableC } /** - * Checks wether the given protocol is registered + * Checks whether the given protocol is registered * * @param $connectionInstance An instance of a ConnectionHelper class - * @return $isRegistered Wether the protocol is registered + * @return $isRegistered Whether the protocol is registered */ private function isProtocolRegistered (ConnectionHelper $connectionInstance) { // Get the key @@ -107,12 +107,12 @@ class ConnectionRegistry extends BaseRegistry implements Register, RegisterableC } /** - * Checks wether given socket resource is registered. If $socketResource is + * Checks whether given socket resource is registered. If $socketResource is * false only the instance will be checked. * * @param $connectionInstance An instance of a ConnectionHelper class * @param $socketResource A valid socket resource - * @return $isRegistered Wether the given socket resource is registered + * @return $isRegistered Whether the given socket resource is registered */ public function isConnectionRegistered (ConnectionHelper $connectionInstance, $socketResource) { // Default is not registered diff --git a/application/hub/main/registry/socket/class_SocketRegistry.php b/application/hub/main/registry/socket/class_SocketRegistry.php index bc72879d0..c07eceb46 100644 --- a/application/hub/main/registry/socket/class_SocketRegistry.php +++ b/application/hub/main/registry/socket/class_SocketRegistry.php @@ -90,10 +90,10 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke } /** - * Checks wether the given protocol is registered + * Checks whether the given protocol is registered * * @param $protocolInstance An instance of a ProtocolHandler class - * @return $isRegistered Wether the protocol is registered + * @return $isRegistered Whether the protocol is registered */ private function isProtocolRegistered (ProtocolHandler $protocolInstance) { // Get the key @@ -107,12 +107,12 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke } /** - * Checks wether given socket resource is registered. If $socketResource is + * Checks whether given socket resource is registered. If $socketResource is * false only the instance will be checked. * * @param $protocolInstance An instance of a ProtocolHandler class * @param $socketResource A valid socket resource - * @return $isRegistered Wether the given socket resource is registered + * @return $isRegistered Whether the given socket resource is registered */ public function isSocketRegistered (ProtocolHandler $protocolInstance, $socketResource) { // Default is not registered diff --git a/application/hub/main/resolver/state/class_BaseStateResolver.php b/application/hub/main/resolver/state/class_BaseStateResolver.php index 4b8d3f3eb..e1af7c9dc 100644 --- a/application/hub/main/resolver/state/class_BaseStateResolver.php +++ b/application/hub/main/resolver/state/class_BaseStateResolver.php @@ -118,10 +118,10 @@ class BaseStateResolver extends BaseResolver { } /** - * Checks wether the given state is valid + * Checks whether the given state is valid * * @param $stateName The default state we shall execute - * @return $isValid Wether the given state is valid + * @return $isValid Whether the given state is valid * @throws EmptyVariableException Thrown if given state is not set * @throws DefaultStateException Thrown if default state was not found */ diff --git a/application/hub/main/states/cruncher/class_BaseCruncherState.php b/application/hub/main/states/cruncher/class_BaseCruncherState.php index c65ef1a6f..ea017b07c 100644 --- a/application/hub/main/states/cruncher/class_BaseCruncherState.php +++ b/application/hub/main/states/cruncher/class_BaseCruncherState.php @@ -34,7 +34,7 @@ class BaseCruncherState extends BaseState { } /** - * Validates wether the state is 'active' or throws an exception if + * Validates whether the state is 'active' or throws an exception if * it is every other state. * * @return void @@ -51,7 +51,7 @@ class BaseCruncherState extends BaseState { /** * Checks if this state is 'virgin' * - * @return $isVirgin Wether this state is 'virgin' + * @return $isVirgin Whether this state is 'virgin' */ public function isCruncherStateVirgin () { // Just compare it... diff --git a/application/hub/main/states/node/class_BaseNodeState.php b/application/hub/main/states/node/class_BaseNodeState.php index 6b37c14d5..3b18ffde2 100644 --- a/application/hub/main/states/node/class_BaseNodeState.php +++ b/application/hub/main/states/node/class_BaseNodeState.php @@ -34,7 +34,7 @@ class BaseNodeState extends BaseState { } /** - * Validates wether the state is 'active' or throws an exception if + * Validates whether the state is 'active' or throws an exception if * it is every other state. * * @return void diff --git a/application/hub/main/states/peer/class_BasePeerState.php b/application/hub/main/states/peer/class_BasePeerState.php index b5d9bc401..e95c5c362 100644 --- a/application/hub/main/states/peer/class_BasePeerState.php +++ b/application/hub/main/states/peer/class_BasePeerState.php @@ -34,7 +34,7 @@ class BasePeerState extends BaseState { } /** - * Validates wether the state is 'connected' or throws an exception if + * Validates whether the state is 'connected' or throws an exception if * it is every other state. * * @return void @@ -49,9 +49,9 @@ class BasePeerState extends BaseState { } /** - * Checks wether the peer's state is 'connected' + * Checks whether the peer's state is 'connected' * - * @return $isConnected Wether the state is 'connected' + * @return $isConnected Whether the state is 'connected' */ public function isPeerStateConnected () { // Just compare it... diff --git a/application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php b/application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php index 2a448e3e1..4e42fe89c 100644 --- a/application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php +++ b/application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php @@ -50,11 +50,11 @@ class ConnectionStatisticsHelper extends BaseHubSystem { } /** - * Checks wether the retry count has reached a configured limit for given + * Checks whether the retry count has reached a configured limit for given * connection. * * @param $helperInstance An instance of a ConnectionHelper class - * @return $isExhausted Wether the retry count has been reached + * @return $isExhausted Whether the retry count has been reached */ public static function isConnectRetryExhausted (ConnectionHelper $helperInstance) { //* NOISY-DEBUG: */ $helperInstance->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - ENTERED!'); diff --git a/application/hub/main/tags/package/class_PackageTags.php b/application/hub/main/tags/package/class_PackageTags.php index 4047b961d..5b39ff61b 100644 --- a/application/hub/main/tags/package/class_PackageTags.php +++ b/application/hub/main/tags/package/class_PackageTags.php @@ -160,11 +160,11 @@ class PackageTags extends BaseTags implements Tagable { } /** - * Checks wether the given package data is accepted by the listener + * Checks whether the given package data is accepted by the listener * * @param $packageData Raw package data * @param $listenerInstance A Listenable instance - * @return $accepts Wether it is accepted + * @return $accepts Whether it is accepted */ public function ifPackageDataIsAcceptedByListener (array $packageData, Listenable $listenerInstance) { // Extract the tags diff --git a/index.php b/index.php index 66a45e537..5d931a605 100644 --- a/index.php +++ b/index.php @@ -52,7 +52,7 @@ final class ApplicationEntryPoint { * @param $message The optional message we shall output on exit * @param $code Error code from exception * @param $extraData Extra information from exceptions - * @param $silentMode Wether not silent mode is turned on + * @param $silentMode Whether silent mode is turned on * @return void * @todo This method is old code and needs heavy rewrite and should be moved to ApplicationHelper */