From: Roland Häder Date: Wed, 2 Dec 2020 03:14:49 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8d0659b95682afd197711296ebe9b1f08a06b8a3;p=hub.git Continued: - stringVal() has been moved to StringUtils class and is now static - updated core framework Signed-off-by: Roland Häder --- diff --git a/application/hub/class_ApplicationHelper.php b/application/hub/class_ApplicationHelper.php index ea51d451e..8545f70a7 100644 --- a/application/hub/class_ApplicationHelper.php +++ b/application/hub/class_ApplicationHelper.php @@ -13,7 +13,6 @@ use Org\Mxchange\CoreFramework\Loader\ClassLoader; use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Template\CompileableTemplate; -use Org\Mxchange\CoreFramework\Utils\String\StringUtils; /** * A class holding general data about the application and some methods for diff --git a/application/hub/classes/handler/chunks/class_ChunkHandler.php b/application/hub/classes/handler/chunks/class_ChunkHandler.php index 223a616b3..0468445c7 100644 --- a/application/hub/classes/handler/chunks/class_ChunkHandler.php +++ b/application/hub/classes/handler/chunks/class_ChunkHandler.php @@ -11,6 +11,7 @@ use Org\Shipsimu\Hub\Network\Package\Delivery\Fragment\PackageFragmenter; use Org\Mxchange\CoreFramework\Assertion\AssertionException; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; +use Org\Mxchange\CoreFramework\Utils\String\StringUtils; use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait; /** @@ -208,10 +209,10 @@ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registera * @param $serialNumber A serial number from a chunk * @return $isValid Whether the serial number is valid */ - private function isSerialNumberValid ($serialNumber) { + private function isSerialNumberValid (string $serialNumber) { // Check it /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CHUNK-HANDLER: serialNumber=%s - CALLED!', $serialNumber)); - $isValid = ((strlen($serialNumber) == PackageFragmenter::MAX_SERIAL_LENGTH) && ($this->hexval($serialNumber, FALSE) === $serialNumber)); + $isValid = ((strlen($serialNumber) == PackageFragmenter::MAX_SERIAL_LENGTH) && (StringUtils::hexval($serialNumber, FALSE) === $serialNumber)); // Return result /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CHUNK-HANDLER: isValid=%d - EXIT!', intval($isValid))); diff --git a/application/hub/classes/package/assembler/class_PackageAssembler.php b/application/hub/classes/package/assembler/class_PackageAssembler.php index 14704afd0..b6611b8ad 100644 --- a/application/hub/classes/package/assembler/class_PackageAssembler.php +++ b/application/hub/classes/package/assembler/class_PackageAssembler.php @@ -18,9 +18,9 @@ use Org\Shipsimu\Hub\Network\Receive\Receivable; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\Handleable; use Org\Mxchange\CoreFramework\Registry\Registerable; -use Org\Mxchange\CoreFramework\Utils\String\StringUtils; use Org\Mxchange\CoreFramework\Stacker\Stackable; use Org\Mxchange\CoreFramework\Traits\Stream\Input\InputStreamTrait; +use Org\Mxchange\CoreFramework\Utils\String\StringUtils; use Org\Mxchange\CoreFramework\Visitor\Visitable; use Org\Mxchange\CoreFramework\Visitor\Visitor; diff --git a/core b/core index 8b3d55749..8de526234 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 8b3d5574973066ee9e99759f283005ca0c8d519b +Subproject commit 8de52623465245375075410e5c14e36c1df1f621