From: Roland Häder Date: Sun, 6 Dec 2020 23:58:00 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ea4641a1e423961447ad6e0a113278f9d283cbeb;p=core.git Continued: - replaced old array() with "new" [] style Signed-off-by: Roland Häder --- diff --git a/framework/main/classes/stacker/class_BaseStacker.php b/framework/main/classes/stacker/class_BaseStacker.php index 70c6a229..9d857e75 100644 --- a/framework/main/classes/stacker/class_BaseStacker.php +++ b/framework/main/classes/stacker/class_BaseStacker.php @@ -228,7 +228,7 @@ abstract class BaseStacker extends BaseFrameworkSystem { throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND); } elseif ($this->isStackFull($stackerName)) { // Stacker is full - throw new FullStackerException(array($this, $stackerName, $value), self::EXCEPTION_STACKER_IS_FULL); + throw new FullStackerException([$this, $stackerName, $value], self::EXCEPTION_STACKER_IS_FULL); } // Now add the value to the stack diff --git a/framework/main/classes/stacker/file/class_BaseFileStack.php b/framework/main/classes/stacker/file/class_BaseFileStack.php index 30f20f9c..8abdaa66 100644 --- a/framework/main/classes/stacker/file/class_BaseFileStack.php +++ b/framework/main/classes/stacker/file/class_BaseFileStack.php @@ -279,7 +279,7 @@ abstract class BaseFileStack extends BaseStacker implements StackableFile { throw new InvalidArgumentException('Parameter "stackerName" is empty'); } elseif ($this->isStackFull($stackerName)) { // Stacker is full - throw new FullStackerException(array($this, $stackerName, $value), self::EXCEPTION_STACKER_IS_FULL); + throw new FullStackerException([$this, $stackerName, $value], self::EXCEPTION_STACKER_IS_FULL); } elseif (is_resource($value) || is_object($value)) { // Not wanted type throw new InvalidArgumentException(sprintf('value[]=%s is not supported', gettype($value))); @@ -314,7 +314,7 @@ abstract class BaseFileStack extends BaseStacker implements StackableFile { throw new InvalidArgumentException('Parameter "stackerName" is empty'); } elseif ($this->isStackEmpty($stackerName)) { // Throw an exception - throw new BadMethodCallException(array($this, $stackerName), self::EXCEPTION_STACKER_IS_EMPTY); + throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY); } // Now get the last value @@ -342,7 +342,7 @@ abstract class BaseFileStack extends BaseStacker implements StackableFile { throw new InvalidArgumentException('Parameter "stackerName" is empty'); } elseif ($this->isStackEmpty($stackerName)) { // Throw an exception - throw new BadMethodCallException(array($this, $stackerName), self::EXCEPTION_STACKER_IS_EMPTY); + throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY); } // Now get the first value @@ -370,7 +370,7 @@ abstract class BaseFileStack extends BaseStacker implements StackableFile { throw new InvalidArgumentException('Parameter "stackerName" is empty'); } elseif ($this->isStackEmpty($stackerName)) { // Throw an exception - throw new BadMethodCallException(array($this, $stackerName), self::EXCEPTION_STACKER_IS_EMPTY); + throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY); } // Now, remove the last entry, we don't care about the return value here, see elseif() block above @@ -394,7 +394,7 @@ abstract class BaseFileStack extends BaseStacker implements StackableFile { throw new InvalidArgumentException('Parameter "stackerName" is empty'); } elseif ($this->isStackEmpty($stackerName)) { // Throw an exception - throw new BadMethodCallException(array($this, $stackerName), self::EXCEPTION_STACKER_IS_EMPTY); + throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY); } // Now, remove the last entry, we don't care about the return value here, see elseif() block above