From: Roland Häder Date: Thu, 9 Feb 2023 18:34:30 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4c3718f4802104b3d00cda889f9f062408d23f96;p=core.git Continued: - converted more old array() to "new" [] way - also added more debug lines - throw more exceptions on bad parameters --- diff --git a/framework/config/class_FrameworkConfiguration.php b/framework/config/class_FrameworkConfiguration.php index 199b15b8..7375aa04 100644 --- a/framework/config/class_FrameworkConfiguration.php +++ b/framework/config/class_FrameworkConfiguration.php @@ -268,7 +268,7 @@ class FrameworkConfiguration implements Registerable { */ public final function getField (string $fieldName) { // The super interface "FrameworkInterface" requires this - throw new UnsupportedOperationException(array($this, __FUNCTION__), BaseFrameworkSystem::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], BaseFrameworkSystem::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -280,7 +280,7 @@ class FrameworkConfiguration implements Registerable { */ public function isFieldSet (string $fieldName) { // The super interface "FrameworkInterface" requires this - throw new UnsupportedOperationException(array($this, __FUNCTION__), BaseFrameworkSystem::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], BaseFrameworkSystem::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/class_BaseFrameworkSystem.php b/framework/main/classes/class_BaseFrameworkSystem.php index 36e7bd6b..31ee5443 100644 --- a/framework/main/classes/class_BaseFrameworkSystem.php +++ b/framework/main/classes/class_BaseFrameworkSystem.php @@ -354,7 +354,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac * @throws UnsupportedOperationException Objects of this framework cannot be serialized */ public final function __sleep () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -364,7 +364,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac * @throws UnsupportedOperationException Objects of this framework cannot be serialized */ public final function __wakeup () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -374,7 +374,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac * @throws UnsupportedOperationException Objects of this framework cannot be serialized */ public final function __invoke () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** diff --git a/framework/main/classes/file_directories/binary/index/class_IndexFile.php b/framework/main/classes/file_directories/binary/index/class_IndexFile.php index c24eca80..10bc8520 100644 --- a/framework/main/classes/file_directories/binary/index/class_IndexFile.php +++ b/framework/main/classes/file_directories/binary/index/class_IndexFile.php @@ -244,7 +244,7 @@ class IndexFile extends BaseBinaryFile implements IndexableFile { */ public function writeDataToFreeGap (string $stackName, string $hash, string $encoded) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('INDEX-FILE: stackName=' . $stackName . ',hash=' . $hash . ',encoded()=' . strlen($encoded)); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/binary/stack/class_StackFile.php b/framework/main/classes/file_directories/binary/stack/class_StackFile.php index a18b87a7..13991972 100644 --- a/framework/main/classes/file_directories/binary/stack/class_StackFile.php +++ b/framework/main/classes/file_directories/binary/stack/class_StackFile.php @@ -240,7 +240,7 @@ class StackFile extends BaseBinaryFile implements FileStacker { */ public function writeDataToFreeGap (string $stackName, string $hash, string $encoded) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('STACK-FILE: stackName=' . $stackName . ',hash=' . $hash . ',encoded()=' . strlen($encoded)); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php b/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php index 6461ae62..d17a77c5 100644 --- a/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php +++ b/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php @@ -14,8 +14,10 @@ use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; // Import SPL stuff +use \InvalidArgumentException; use \SplFileInfo; use \SplFileObject; +use \UnexpectedValueException; /** * A class for reading files @@ -85,6 +87,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { } // Create new instance + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-INPUT-POINTER: fileObject.pathname=%s', $fileObject->getPathname())); $pointerInstance = new FrameworkRawFileInputPointer(); // Set file pointer and file name @@ -103,6 +106,8 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { * @throws LogicException If there is no object being set */ public function readFromFile () { + // Trace message + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-FILE-INPUT-POINTER: CALLED!'); if (is_null($this->getFileObject())) { // Pointer not initialized throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER); @@ -112,6 +117,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { } // Read data from the file pointer and return it + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-FILE-INPUT-POINTER: Invoking this->read(1024) - EXIT!'); return $this->read(1024); } @@ -123,7 +129,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { */ public function readLine () { // Not supported in binary files ... - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -131,12 +137,28 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { * * @param $bytes Amount of bytes to read * @return $data Data read from file + * @throws InvalidArgumentException If a parameter is not valid + * @throws UnexpectedValueException If fread() returns a non-string value */ public function read (int $bytes = 0) { + // Trace message + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-INPUT-POINTER: bytes=%d - CALLED!', $bytes)); + if ($bytes < 0) { + // Throw IAE + throw new InvalidArgumentException(sprintf('bytes=%d is an invalid value, only zero or postive numbers are accepted', $bytes)); + } + // Try to read given characters $data = $this->getFileObject()->fread($bytes); + // Is it valid? + if (!is_string($data)) { + // Is not a string + throw new UnexpectedValueException(sprintf('Returned data[]=%s is not expected.', gettype($data))); + } + // Then return it + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-INPUT-POINTER: data()=%d - EXIT!', strlen($data))); return $data; } @@ -149,7 +171,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function analyzeFileStructure () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -159,7 +181,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function next () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -170,7 +192,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function valid () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -180,7 +202,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function key () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php b/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php index c5b3e811..dee8f187 100644 --- a/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php +++ b/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php @@ -158,7 +158,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function analyzeFileStructure () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -168,7 +168,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function next () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -179,7 +179,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function valid () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -189,7 +189,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function key () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php b/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php index 523bcfcf..dc326cfa 100644 --- a/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php +++ b/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php @@ -266,7 +266,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP * @throws UnsupportedOperationException If this method is called */ public function analyzeFileStructure () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -276,7 +276,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP * @throws UnsupportedOperationException If this method is called */ public function next () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -287,7 +287,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP * @throws UnsupportedOperationException If this method is called */ public function valid () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -297,7 +297,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP * @throws UnsupportedOperationException If this method is called */ public function key () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** diff --git a/framework/main/classes/file_directories/io_stream/class_FileIoStream.php b/framework/main/classes/file_directories/io_stream/class_FileIoStream.php index b40dbfe2..e6f38961 100644 --- a/framework/main/classes/file_directories/io_stream/class_FileIoStream.php +++ b/framework/main/classes/file_directories/io_stream/class_FileIoStream.php @@ -312,7 +312,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** diff --git a/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php b/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php index fa724376..c6e47128 100644 --- a/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php +++ b/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php @@ -124,7 +124,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function analyzeFileStructure () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -136,7 +136,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function writeAtPosition (int $seedPosition, string $data) { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -146,7 +146,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function next () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -157,7 +157,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function valid () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -167,7 +167,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function key () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php b/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php index 3fb98687..51562b21 100644 --- a/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php +++ b/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php @@ -121,7 +121,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function analyzeFileStructure () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -133,7 +133,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function writeAtPosition (int $seedPosition, string $data) { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -143,7 +143,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function next () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -154,7 +154,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function valid () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -164,7 +164,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function key () { - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/text/class_BaseTextFile.php b/framework/main/classes/file_directories/text/class_BaseTextFile.php index 4c55428d..57d43006 100644 --- a/framework/main/classes/file_directories/text/class_BaseTextFile.php +++ b/framework/main/classes/file_directories/text/class_BaseTextFile.php @@ -50,7 +50,7 @@ abstract class BaseTextFile extends BaseAbstractFile { */ public function determineSeekPosition () { // Not possible in text files - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -63,7 +63,7 @@ abstract class BaseTextFile extends BaseAbstractFile { public function seek (int $offset, int $whence = SEEK_SET) { // Not possible in text files self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEXT-FILE: offset=' . $offset . ',whence=' . $whence); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -80,7 +80,7 @@ abstract class BaseTextFile extends BaseAbstractFile { * There is no need to read/write the whole file. */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEXT-FILE: infoInstance=' . $infoInstance); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php b/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php index 12764396..5602c6ed 100644 --- a/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php +++ b/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php @@ -111,7 +111,7 @@ class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStre */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/output/debug/error/class_DebugErrorLogOutput.php b/framework/main/classes/output/debug/error/class_DebugErrorLogOutput.php index 96e30b98..81fb424c 100644 --- a/framework/main/classes/output/debug/error/class_DebugErrorLogOutput.php +++ b/framework/main/classes/output/debug/error/class_DebugErrorLogOutput.php @@ -101,7 +101,7 @@ class DebugErrorLogOutput extends BaseDebugOutput implements Debugger, OutputStr */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/output/debug/web/class_DebugWebOutput.php b/framework/main/classes/output/debug/web/class_DebugWebOutput.php index 7a1ac227..15df0398 100644 --- a/framework/main/classes/output/debug/web/class_DebugWebOutput.php +++ b/framework/main/classes/output/debug/web/class_DebugWebOutput.php @@ -90,7 +90,7 @@ class DebugWebOutput extends BaseDebugOutput implements Debugger, OutputStreamer */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/streams/crypto/mcrypt/class_McryptStream.php b/framework/main/classes/streams/crypto/mcrypt/class_McryptStream.php index 1554b6fa..81acc7e7 100644 --- a/framework/main/classes/streams/crypto/mcrypt/class_McryptStream.php +++ b/framework/main/classes/streams/crypto/mcrypt/class_McryptStream.php @@ -172,7 +172,7 @@ class McryptStream extends BaseCryptoStream implements EncryptableStream { */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/streams/crypto/null/class_NullCryptoStream.php b/framework/main/classes/streams/crypto/null/class_NullCryptoStream.php index 978320dd..8365c8d1 100644 --- a/framework/main/classes/streams/crypto/null/class_NullCryptoStream.php +++ b/framework/main/classes/streams/crypto/null/class_NullCryptoStream.php @@ -87,7 +87,7 @@ class NullCryptoStream extends BaseCryptoStream implements EncryptableStream { */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/streams/crypto/openssl/class_OpenSslStream.php b/framework/main/classes/streams/crypto/openssl/class_OpenSslStream.php index 8ec20d1d..62bd3fb8 100644 --- a/framework/main/classes/streams/crypto/openssl/class_OpenSslStream.php +++ b/framework/main/classes/streams/crypto/openssl/class_OpenSslStream.php @@ -177,7 +177,7 @@ class OpenSslStream extends BaseCryptoStream implements EncryptableStream { */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/middleware/io/class_FileIoHandler.php b/framework/main/middleware/io/class_FileIoHandler.php index a36e3547..a496f2e0 100644 --- a/framework/main/middleware/io/class_FileIoHandler.php +++ b/framework/main/middleware/io/class_FileIoHandler.php @@ -98,7 +98,7 @@ class FileIoHandler extends BaseMiddleware implements IoHandler { */ public function saveFile (SplFileInfo $infoInstance, array $dataArray) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('infoInstance.pathname=' . $infoInstance->getPathname() . ',dataArray()=' . count($dataArray)); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); } /**