From 0e90ab118a1044444f61dc472e8032df942c061b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 18 Feb 2023 02:07:58 +0100 Subject: [PATCH] Continued: - EXCEPTION_UNSPPORTED_OPERATION has been moved to FrameworkInterface - also changed some old array() to "new" [] style - updated 'core' framework --- .../recipient/socket/class_PackageSocketDiscovery.php | 2 +- .../answer/class_PackageAnnouncementAnswerTagFilter.php | 5 +++-- .../answer/class_PackageDhtBootstrapAnswerTagFilter.php | 5 +++-- .../answer/class_PackageRequestNodeListAnswerTagFilter.php | 5 +++-- .../filter/tags/class_PackageAnnouncementTagFilter.php | 5 +++-- .../filter/tags/class_PackageDhtBootstrapTagFilter.php | 5 +++-- .../filter/tags/class_PackageRequestNodeListTagFilter.php | 5 +++-- .../filter/tags/class_PackageSelfConnectTagFilter.php | 5 +++-- .../self-connect/class_NodeMessageSelfConnectHandler.php | 3 ++- .../hub/classes/info/connection/class_ConnectionInfo.php | 2 +- .../producer/keys/class_TestUnitKeyProducerIterator.php | 5 +++-- .../classes/listener/socket/class_SocketFileListener.php | 2 +- application/hub/classes/listener/tcp/class_TcpListener.php | 2 +- application/hub/classes/listener/udp/class_UdpListener.php | 5 +++-- .../hub/classes/lists/pool/class_PoolEntriesList.php | 2 +- application/hub/classes/nodes/class_BaseHubNode.php | 4 ++-- .../hub/classes/package/deliverable/class_PackageData.php | 2 +- .../hub/classes/resolver/state/class_BaseStateResolver.php | 2 +- .../streams/raw_data/input/class_RawDataInputStream.php | 6 +++--- core | 2 +- 20 files changed, 42 insertions(+), 32 deletions(-) diff --git a/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php b/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php index 6cc3ddc64..e406aa2ba 100644 --- a/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php +++ b/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php @@ -175,7 +175,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera // Does the UNL validate? if (!$protocolInstance->isValidUniversalNodeLocatorByPackageInstance($packageInstance)) { // Not valid, throw exception - throw new InvalidUnlException(array($this, $protocolInstance, $packageInstance), DiscoverableUniversalNodeLocator::EXCEPTION_INVALID_UNL); + throw new InvalidUnlException([$this, $protocolInstance, $packageInstance], DiscoverableUniversalNodeLocator::EXCEPTION_INVALID_UNL); } // Get the listener instance diff --git a/application/hub/classes/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php b/application/hub/classes/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php index 7899493e6..b07a1fd6f 100644 --- a/application/hub/classes/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php +++ b/application/hub/classes/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php @@ -12,6 +12,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEng // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -82,7 +83,7 @@ class PackageAnnouncementAnswerTagFilter extends BaseNodeFilter implements Filte */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -108,7 +109,7 @@ class PackageAnnouncementAnswerTagFilter extends BaseNodeFilter implements Filte */ public function postProcessMessage (Receivable $handlerInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/application/hub/classes/filter/tags/answer/class_PackageDhtBootstrapAnswerTagFilter.php b/application/hub/classes/filter/tags/answer/class_PackageDhtBootstrapAnswerTagFilter.php index db928f160..617010a14 100644 --- a/application/hub/classes/filter/tags/answer/class_PackageDhtBootstrapAnswerTagFilter.php +++ b/application/hub/classes/filter/tags/answer/class_PackageDhtBootstrapAnswerTagFilter.php @@ -12,6 +12,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEng // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -79,7 +80,7 @@ class PackageDhtBootstrapAnswerTagFilter extends BaseNodeFilter implements Filte */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -105,7 +106,7 @@ class PackageDhtBootstrapAnswerTagFilter extends BaseNodeFilter implements Filte */ public function postProcessMessage (Receivable $handlerInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/application/hub/classes/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php b/application/hub/classes/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php index a621fb025..8abcaa21e 100644 --- a/application/hub/classes/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php +++ b/application/hub/classes/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php @@ -12,6 +12,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEng // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -79,7 +80,7 @@ class PackageRequestNodeListAnswerTagFilter extends BaseNodeFilter implements Fi */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -105,7 +106,7 @@ class PackageRequestNodeListAnswerTagFilter extends BaseNodeFilter implements Fi */ public function postProcessMessage (Receivable $handlerInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/application/hub/classes/filter/tags/class_PackageAnnouncementTagFilter.php b/application/hub/classes/filter/tags/class_PackageAnnouncementTagFilter.php index 99a68e586..ce1bb4f14 100644 --- a/application/hub/classes/filter/tags/class_PackageAnnouncementTagFilter.php +++ b/application/hub/classes/filter/tags/class_PackageAnnouncementTagFilter.php @@ -10,6 +10,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Announcement\XmlAnnouncementTemplateEng // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -81,7 +82,7 @@ class PackageAnnouncementTagFilter extends BaseNodeFilter implements FilterableP */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -114,7 +115,7 @@ class PackageAnnouncementTagFilter extends BaseNodeFilter implements FilterableP */ public function postProcessMessage (Receivable $handlerInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/application/hub/classes/filter/tags/class_PackageDhtBootstrapTagFilter.php b/application/hub/classes/filter/tags/class_PackageDhtBootstrapTagFilter.php index 94c9e464e..b271325ae 100644 --- a/application/hub/classes/filter/tags/class_PackageDhtBootstrapTagFilter.php +++ b/application/hub/classes/filter/tags/class_PackageDhtBootstrapTagFilter.php @@ -11,6 +11,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEn // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -80,7 +81,7 @@ class PackageDhtBootstrapTagFilter extends BaseNodeFilter implements FilterableP */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -113,7 +114,7 @@ class PackageDhtBootstrapTagFilter extends BaseNodeFilter implements FilterableP */ public function postProcessMessage (Receivable $handlerInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/application/hub/classes/filter/tags/class_PackageRequestNodeListTagFilter.php b/application/hub/classes/filter/tags/class_PackageRequestNodeListTagFilter.php index 7d2b80485..29d3e9299 100644 --- a/application/hub/classes/filter/tags/class_PackageRequestNodeListTagFilter.php +++ b/application/hub/classes/filter/tags/class_PackageRequestNodeListTagFilter.php @@ -11,6 +11,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Request\NodeList\XmlRequestNodeListTemp // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -77,7 +78,7 @@ class PackageRequestNodeListTagFilter extends BaseNodeFilter implements Filterab */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -102,7 +103,7 @@ class PackageRequestNodeListTagFilter extends BaseNodeFilter implements Filterab */ public function postProcessMessage (Receivable $handlerInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/application/hub/classes/filter/tags/class_PackageSelfConnectTagFilter.php b/application/hub/classes/filter/tags/class_PackageSelfConnectTagFilter.php index 34bde5eda..71e724a98 100644 --- a/application/hub/classes/filter/tags/class_PackageSelfConnectTagFilter.php +++ b/application/hub/classes/filter/tags/class_PackageSelfConnectTagFilter.php @@ -12,6 +12,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\SelfConnect\XmlSelfConnectTemplateEngin // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -78,7 +79,7 @@ class PackageSelfConnectTagFilter extends BaseNodeFilter implements FilterablePa */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -111,7 +112,7 @@ class PackageSelfConnectTagFilter extends BaseNodeFilter implements FilterablePa */ public function postProcessMessage (Receivable $handlerInstance) { // Please don't call this method - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/application/hub/classes/handler/data/message-types/self-connect/class_NodeMessageSelfConnectHandler.php b/application/hub/classes/handler/data/message-types/self-connect/class_NodeMessageSelfConnectHandler.php index 5cc708fba..0ac6f8bc7 100644 --- a/application/hub/classes/handler/data/message-types/self-connect/class_NodeMessageSelfConnectHandler.php +++ b/application/hub/classes/handler/data/message-types/self-connect/class_NodeMessageSelfConnectHandler.php @@ -12,6 +12,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\SelfConnect\XmlSelfConnectTemplateEngin // Import framework stuff use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Registry\Registerable; @@ -103,7 +104,7 @@ class NodeMessageSelfConnectHandler extends BaseMessageHandler implements Handle parent::addArrayToDataSet($dataSetInstance, $messageInstance); // Please don't call this method! - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/application/hub/classes/info/connection/class_ConnectionInfo.php b/application/hub/classes/info/connection/class_ConnectionInfo.php index 723868ecb..e9873a4f7 100644 --- a/application/hub/classes/info/connection/class_ConnectionInfo.php +++ b/application/hub/classes/info/connection/class_ConnectionInfo.php @@ -208,7 +208,7 @@ class ConnectionInfo extends BaseInfo implements ShareableInfo, Registerable { /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO: Invoking socketInstance->determineSocketPeerName(%s,%d) ...', $socketAddress, $socketPort)); if (!$socketInstance->determineSocketPeerName($socketAddress, $socketPort)) { // Did not work - throw new InvalidSocketException(array($this, $socketInstance->getSocketResource()), self::EXCEPTION_INVALID_SOCKET); + throw new InvalidSocketException([$this, $socketInstance->getSocketResource()], self::EXCEPTION_INVALID_SOCKET); } // Fill the generic array with several data from the listener: diff --git a/application/hub/classes/iterator/producer/keys/class_TestUnitKeyProducerIterator.php b/application/hub/classes/iterator/producer/keys/class_TestUnitKeyProducerIterator.php index 587d4fccf..3f017b4f6 100644 --- a/application/hub/classes/iterator/producer/keys/class_TestUnitKeyProducerIterator.php +++ b/application/hub/classes/iterator/producer/keys/class_TestUnitKeyProducerIterator.php @@ -4,6 +4,7 @@ namespace Org\Shipsimu\Hub\Iterator\Producer\Key\TestUnit; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Iterator\BaseIterator; @@ -106,7 +107,7 @@ class TestUnitKeyProducerIterator extends BaseIterator implements Iterator { * @throws UnsupportedOperationException This method should not be called */ public function key () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -131,7 +132,7 @@ class TestUnitKeyProducerIterator extends BaseIterator implements Iterator { * @throws UnsupportedOperationException This method should not be called */ public function rewind () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** diff --git a/application/hub/classes/listener/socket/class_SocketFileListener.php b/application/hub/classes/listener/socket/class_SocketFileListener.php index 32863225b..59c2fee99 100644 --- a/application/hub/classes/listener/socket/class_SocketFileListener.php +++ b/application/hub/classes/listener/socket/class_SocketFileListener.php @@ -77,7 +77,7 @@ class SocketFileListener extends BaseListener implements Listenable { $this->registerServerSocketInstance($socketInstance); // Initialize the peer pool instance - $poolInstance = ObjectFactory::createObjectByConfiguredName('application_pool_class', array($this)); + $poolInstance = ObjectFactory::createObjectByConfiguredName('application_pool_class', [$this]); // Add main socket $poolInstance->addPeer($socketInstance, StorableSocket::CONNECTION_TYPE_SERVER); diff --git a/application/hub/classes/listener/tcp/class_TcpListener.php b/application/hub/classes/listener/tcp/class_TcpListener.php index 4ce47c346..333ad2a38 100644 --- a/application/hub/classes/listener/tcp/class_TcpListener.php +++ b/application/hub/classes/listener/tcp/class_TcpListener.php @@ -73,7 +73,7 @@ class TcpListener extends BaseListener implements Listenable { $this->registerServerSocketInstance($socketInstance); // Initialize the peer pool instance - $poolInstance = ObjectFactory::createObjectByConfiguredName('node_pool_class', array($this)); + $poolInstance = ObjectFactory::createObjectByConfiguredName('node_pool_class', [$this]); // Add main socket $poolInstance->addPeer($socketInstance, StorableSocket::CONNECTION_TYPE_SERVER); diff --git a/application/hub/classes/listener/udp/class_UdpListener.php b/application/hub/classes/listener/udp/class_UdpListener.php index 025f71a48..ae4c2d7ca 100644 --- a/application/hub/classes/listener/udp/class_UdpListener.php +++ b/application/hub/classes/listener/udp/class_UdpListener.php @@ -11,6 +11,7 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; /** @@ -75,7 +76,7 @@ class UdpListener extends BaseListener implements Listenable { $this->registerServerSocketInstance($socketInstance); // Initialize the peer pool instance - $poolInstance = ObjectFactory::createObjectByConfiguredName('node_pool_class', array($this)); + $poolInstance = ObjectFactory::createObjectByConfiguredName('node_pool_class', [$this]); // Add main socket $poolInstance->addPeer($socketInstance, StorableSocket::CONNECTION_TYPE_SERVER); @@ -124,7 +125,7 @@ class UdpListener extends BaseListener implements Listenable { * @throws UnsupportedOperationException If this method is called */ public function ifListenerAcceptsPackageData (DeliverablePackage $packageInstance) { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/application/hub/classes/lists/pool/class_PoolEntriesList.php b/application/hub/classes/lists/pool/class_PoolEntriesList.php index 4a4a06d93..466f84f97 100644 --- a/application/hub/classes/lists/pool/class_PoolEntriesList.php +++ b/application/hub/classes/lists/pool/class_PoolEntriesList.php @@ -63,7 +63,7 @@ class PoolEntriesList extends BaseList implements Listable { */ public function getListIterator () { // Get the iterator instance from the factory - $iteratorInstance = ObjectFactory::createObjectByConfiguredName('node_ping_iterator_class', array($this)); + $iteratorInstance = ObjectFactory::createObjectByConfiguredName('node_ping_iterator_class', [$this]); // Rewind it $iteratorInstance->rewind(); diff --git a/application/hub/classes/nodes/class_BaseHubNode.php b/application/hub/classes/nodes/class_BaseHubNode.php index ea97f3c5a..fcb108d5e 100644 --- a/application/hub/classes/nodes/class_BaseHubNode.php +++ b/application/hub/classes/nodes/class_BaseHubNode.php @@ -606,7 +606,7 @@ abstract class BaseHubNode extends BaseHubSystem implements Updateable, AddableC self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-HUB-NODE: Self Connection: START (taskInstance=' . $taskInstance->__toString(). ')'); // Get a helper instance - $helperInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_helper_class', array($this)); + $helperInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_helper_class', [$this]); // Load the descriptor (XML) file $helperInstance->loadDescriptorXml($this); @@ -660,7 +660,7 @@ abstract class BaseHubNode extends BaseHubSystem implements Updateable, AddableC self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-HUB-NODE: Initialize listener: START'); // Get a new pool instance - $this->setListenerPoolInstance(ObjectFactory::createObjectByConfiguredName('listener_pool_class', array($this))); + $this->setListenerPoolInstance(ObjectFactory::createObjectByConfiguredName('listener_pool_class', [$this])); // Get an instance of the low-level listener $listenerInstance = ObjectFactory::createObjectByConfiguredName('socket_file_listener_class'); diff --git a/application/hub/classes/package/deliverable/class_PackageData.php b/application/hub/classes/package/deliverable/class_PackageData.php index be195bfbc..29c8f1ac8 100644 --- a/application/hub/classes/package/deliverable/class_PackageData.php +++ b/application/hub/classes/package/deliverable/class_PackageData.php @@ -449,7 +449,7 @@ class PackageData extends BaseHubSystem implements DeliverablePackage, Registera } // Invoke getter method - $value = call_user_func_array(array($this, sprintf('get%s', ucfirst($propertyInstance->getName()))), array()); + $value = call_user_func_array([$this, sprintf('get%s', ucfirst($propertyInstance->getName()))], []); // Add name/value //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('PACKAGE-DATA: Adding %s[%s]=%s', $propertyInstance->getName(), gettype($value), $value)); diff --git a/application/hub/classes/resolver/state/class_BaseStateResolver.php b/application/hub/classes/resolver/state/class_BaseStateResolver.php index bc28654bd..fd7e000de 100644 --- a/application/hub/classes/resolver/state/class_BaseStateResolver.php +++ b/application/hub/classes/resolver/state/class_BaseStateResolver.php @@ -118,7 +118,7 @@ abstract class BaseStateResolver extends BaseResolver { // Initialize the state $stateInstance = ObjectFactory::createObjectByName( $this->getClassName(), - array($this) + [$this] ); // Return the result diff --git a/application/hub/classes/streams/raw_data/input/class_RawDataInputStream.php b/application/hub/classes/streams/raw_data/input/class_RawDataInputStream.php index e27ba2398..7a4a2d27c 100644 --- a/application/hub/classes/streams/raw_data/input/class_RawDataInputStream.php +++ b/application/hub/classes/streams/raw_data/input/class_RawDataInputStream.php @@ -90,7 +90,7 @@ class RawDataInputStream extends BaseStream implements InputStream { throw new InvalidArgumentException(sprintf('data=%s has different count of start/end markers set', $data)); } elseif (substr_count($data, HandleableRawData::STREAM_START_MARKER) > 1) { // Please do it outside this method - throw new MultipleMessageSentException(array($this, $data), HandleableMessage::EXCEPTION_MULTIPLE_MESSAGE_SENT); + throw new MultipleMessageSentException([$this, $data], HandleableMessage::EXCEPTION_MULTIPLE_MESSAGE_SENT); } // Remove both @@ -99,10 +99,10 @@ class RawDataInputStream extends BaseStream implements InputStream { // Can it be validated? if ((strlen($data) % 4) != 0) { // Length modulo 4 must be zero, else it is an invalid Base64 message - throw new Base64EncodingModuloException(array($this, $data), HubInterface::EXCEPTION_BASE64_ENCODING_NOT_MODULO_4); + throw new Base64EncodingModuloException([$this, $data], HubInterface::EXCEPTION_BASE64_ENCODING_NOT_MODULO_4); } elseif (!$this->isBase64Encoded($data)) { // Is not a valid Base64-encoded message - throw new Base64EncodingBadException(array($this, $data), HubInterface::EXCEPTION_BASE64_BAD_ENCODING); + throw new Base64EncodingBadException([$this, $data], HubInterface::EXCEPTION_BASE64_BAD_ENCODING); } else { // Decode the data with BASE64-encoding $data = base64_decode($data); diff --git a/core b/core index 262f905be..1287590bb 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 262f905be8d6f9dc9fd02acc9505cb45ef2a53f6 +Subproject commit 1287590bb4dff94252b1c45f320d93ce65eb5495 -- 2.39.5