]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 21 Aug 2025 22:46:00 +0000 (00:46 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 21 Aug 2025 22:46:00 +0000 (00:46 +0200)
- lesser old array() way

application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php
framework/main/classes/resolver/command/class_BaseCommandResolver.php
framework/main/classes/resolver/command/console/class_ConsoleCommandResolver.php
framework/main/classes/resolver/command/html/class_Html
framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php
framework/main/classes/resolver/command/image/class_ImageCommandResolver.php

index 72aca8d4bb83c69d128994afaa58cd588d5bba87..8089c4cdf634b64f5750a26de6b3435d509c018b 100644 (file)
@@ -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
index 2a231dc0ee4e98c0fcda71db7f27b1fd268d795a..15014181601cc9e399c59d8b9719e034892882f2 100644 (file)
@@ -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
index 11833a18a3e4779865941edb923ca2dfc197d66c..97358fc6e843460625708f1c9c4aac9d8e737d12 100644 (file)
@@ -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
index ecd1ff7af5d4cd1387e9384457441389f9b1c69b..8d954d8e725cb19e500bc32540016ecca0a39982 100644 (file)
@@ -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
index 46ee3eae05d4350d553cc1be9b7abef41a4e89d7..8e00ab24d681ccf43705930da2098077968647c1 100644 (file)
@@ -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
index c74f08b04179322a883c5aa7cd5d1d0ff798d6de..d42784bc2d7a3b3c3b3aa0b98a781064d3886e70 100644 (file)
@@ -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