From ea4641a1e423961447ad6e0a113278f9d283cbeb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 7 Dec 2020 00:58:00 +0100 Subject: [PATCH] Continued: - replaced old array() with "new" [] style MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- framework/main/classes/stacker/class_BaseStacker.php | 2 +- .../main/classes/stacker/file/class_BaseFileStack.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) 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 -- 2.39.2