From 6e66d0ff24201ecff49aaeb1fc8fd21fdee55e12 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 22 Aug 2025 00:46:00 +0200 Subject: [PATCH] Continued: - lesser old array() way --- .../command/console/class_TestsConsoleCommandResolver.php | 2 +- .../classes/resolver/command/class_BaseCommandResolver.php | 6 +++--- .../command/console/class_ConsoleCommandResolver.php | 2 +- framework/main/classes/resolver/command/html/class_Html | 2 +- .../resolver/command/html/class_HtmlCommandResolver.php | 2 +- .../resolver/command/image/class_ImageCommandResolver.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php b/application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php index 72aca8d4..8089c4cd 100644 --- a/application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php +++ b/application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php @@ -65,7 +65,7 @@ class TestsConsoleCommandResolver extends BaseCommandResolver implements Command throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT); } elseif ($resolverInstance->isCommandValid('Org\Mxchange\CoreFramework\Tests\Command', $commandName) === false) { // Invalid command found - throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND); + throw new InvalidCommandException([$resolverInstance, $commandName], self::EXCEPTION_INVALID_COMMAND); } // Set namespace for command diff --git a/framework/main/classes/resolver/command/class_BaseCommandResolver.php b/framework/main/classes/resolver/command/class_BaseCommandResolver.php index 2a231dc0..15014181 100644 --- a/framework/main/classes/resolver/command/class_BaseCommandResolver.php +++ b/framework/main/classes/resolver/command/class_BaseCommandResolver.php @@ -100,7 +100,7 @@ abstract class BaseCommandResolver extends BaseResolver { // Is this class loaded? if (!class_exists($this->getClassName())) { // Class not found, so throw an exception - throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); + throw new InvalidCommandException([$this, $commandName], self::EXCEPTION_INVALID_COMMAND); } // Initiate the command @@ -134,7 +134,7 @@ abstract class BaseCommandResolver extends BaseResolver { // Check if command is valid if ($this->isCommandValid($this->getNamespace(), $commandName) === false) { // This command is invalid! - throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); + throw new InvalidCommandException([$this, $commandName], self::EXCEPTION_INVALID_COMMAND); } // Get the command @@ -187,7 +187,7 @@ abstract class BaseCommandResolver extends BaseResolver { // Check if command is valid if ($this->isCommandValid($namespace, $commandName) === false) { // This command is invalid! - throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); + throw new InvalidCommandException([$this, $commandName], self::EXCEPTION_INVALID_COMMAND); } // Get the command diff --git a/framework/main/classes/resolver/command/console/class_ConsoleCommandResolver.php b/framework/main/classes/resolver/command/console/class_ConsoleCommandResolver.php index 11833a18..97358fc6 100644 --- a/framework/main/classes/resolver/command/console/class_ConsoleCommandResolver.php +++ b/framework/main/classes/resolver/command/console/class_ConsoleCommandResolver.php @@ -69,7 +69,7 @@ class ConsoleCommandResolver extends BaseCommandResolver implements CommandResol throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT); } elseif (!$resolverInstance->isCommandValid($namespace, $commandName)) { // Invalid command found - throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND); + throw new InvalidCommandException([$resolverInstance, $commandName], self::EXCEPTION_INVALID_COMMAND); } // Return the prepared instance diff --git a/framework/main/classes/resolver/command/html/class_Html b/framework/main/classes/resolver/command/html/class_Html index ecd1ff7a..8d954d8e 100644 --- a/framework/main/classes/resolver/command/html/class_Html +++ b/framework/main/classes/resolver/command/html/class_Html @@ -59,7 +59,7 @@ class Html???CommandResolver extends BaseCommandResolver implements CommandResol throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); } elseif ($resolverInstance->isCommandValid($commandName) === false) { // Invalid command found - throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND); + throw new InvalidCommandException($resolverInstance, $commandName], self::EXCEPTION_INVALID_COMMAND); } // Set the application instance diff --git a/framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php b/framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php index 46ee3eae..8e00ab24 100644 --- a/framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php +++ b/framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php @@ -70,7 +70,7 @@ class HtmlCommandResolver extends BaseCommandResolver implements CommandResolver } elseif ($resolverInstance->isCommandValid($commandName) === false) { // Invalid command found // @TODO Missing namespace! - throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND); + throw new InvalidCommandException([$resolverInstance, $commandName], self::EXCEPTION_INVALID_COMMAND); } // Return the prepared instance diff --git a/framework/main/classes/resolver/command/image/class_ImageCommandResolver.php b/framework/main/classes/resolver/command/image/class_ImageCommandResolver.php index c74f08b0..d42784bc 100644 --- a/framework/main/classes/resolver/command/image/class_ImageCommandResolver.php +++ b/framework/main/classes/resolver/command/image/class_ImageCommandResolver.php @@ -70,7 +70,7 @@ class ImageCommandResolver extends BaseCommandResolver implements CommandResolve } elseif ($resolverInstance->isCommandValid($commandName) === false) { // @TODO Missing namespace! // Invalid command found - throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND); + throw new InvalidCommandException([$resolverInstance, $commandName], self::EXCEPTION_INVALID_COMMAND); } // Return the prepared instance -- 2.39.5