]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/factories/states/peer/class_PeerStateFactory.php
Some 'abstract' are required
[hub.git] / application / hub / main / factories / states / peer / class_PeerStateFactory.php
index 181fc970000b0a2e6a79ed605a99a24f68185766..2837ae6650ed574d83650b9ead357fe725464cb7 100644 (file)
@@ -82,14 +82,14 @@ class PeerStateFactory extends ObjectFactory {
                        // Debug output
                        $tableInstance->debugOutput('PEER-STATE-FACTORY: errorCode=' . $errorCode);
 
-                       // Is a new peer so create the state instance based on error code, first we need a config entry
-                       $configEntry = 'peer_' . $errorCode . '_state_class';
-
                        // Register the new peer with its session id
                        $tableInstance->registerPeerByPackageData($packageData, $socketResource);
 
-                       // Then get it
-                       $stateInstance = self::createObjectByConfiguredName($configEntry);
+                       /*
+                        * It is a new peer so create the state instance based on error
+                        * code and get an instance from it.
+                        */
+                       $stateInstance = self::createObjectByConfiguredName('peer_' . $errorCode . '_state_class');
 
                        // And register it with the lookup table
                        $tableInstance->registerPeerState($stateInstance, $packageData);