]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 9 Feb 2023 18:34:30 +0000 (19:34 +0100)
committerRoland Häder <roland@mxchange.org>
Thu, 9 Feb 2023 18:34:30 +0000 (19:34 +0100)
- converted more old array() to "new" [] way
- also added more debug lines
- throw more exceptions on bad parameters

18 files changed:
framework/config/class_FrameworkConfiguration.php
framework/main/classes/class_BaseFrameworkSystem.php
framework/main/classes/file_directories/binary/index/class_IndexFile.php
framework/main/classes/file_directories/binary/stack/class_StackFile.php
framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php
framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php
framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php
framework/main/classes/file_directories/io_stream/class_FileIoStream.php
framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php
framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php
framework/main/classes/file_directories/text/class_BaseTextFile.php
framework/main/classes/output/debug/console/class_DebugConsoleOutput.php
framework/main/classes/output/debug/error/class_DebugErrorLogOutput.php
framework/main/classes/output/debug/web/class_DebugWebOutput.php
framework/main/classes/streams/crypto/mcrypt/class_McryptStream.php
framework/main/classes/streams/crypto/null/class_NullCryptoStream.php
framework/main/classes/streams/crypto/openssl/class_OpenSslStream.php
framework/main/middleware/io/class_FileIoHandler.php

index 199b15b8b71f0db1a29022d58e0cc41daf47407c..7375aa0433c26404129ff67411f8b4ec0009818b 100644 (file)
@@ -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);
        }
 
 }
index 36e7bd6b64d49a8103407e060403f212fe29a2e5..31ee5443b198f948a24b2c71043e5f0ed250a9b2 100644 (file)
@@ -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);
        }
 
        /**
index c24eca80b3d540c0a7f74c88838a824b16bec228..10bc85203cf27136767c7088e82ba49cc95e26ac 100644 (file)
@@ -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);
        }
 
 }
index a18b87a7e2bb49e6576b29b729a12bc7cf0dfb42..13991972c6b30c9064fb4a6a440d1011ba64c994 100644 (file)
@@ -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);
        }
 
 }
index 6461ae621fef1efeabc91d9f6b35b561bb2a3af0..d17a77c502ffdbfcedbff07c7f818f127ab8633b 100644 (file)
@@ -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);
        }
 
 }
index c5b3e8113b850d2c62d068c181ef5a7419515ad4..dee8f18724b7c5335df159822bed34e5c37422f7 100644 (file)
@@ -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);
        }
 
 }
index 523bcfcf55a5621f3072d98272a35c7d62b824db..dc326cfaa7c5cc7e8f666bc5b643a7944f4a0ecf 100644 (file)
@@ -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);
        }
 
        /**
index b40dbfe20e38ab7a97df5fd8860663ba7fb0d170..e6f38961cf1cf0151d77c7a70acc07ee7f8eee94 100644 (file)
@@ -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);
        }
 
        /**
index fa7243762c6394bb28d21b7893fe76be485fd033..c6e4712857bce8cf9dd5b2a7896b446f8ebae4bd 100644 (file)
@@ -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);
        }
 
 }
index 3fb986879545437a97dd1bd2947bc9113bd1c3ad..51562b218147d063e41abe730bd615f2cca4c812 100644 (file)
@@ -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);
        }
 
 }
index 4c55428d81803a6a27f50ce0ede07cb6742015be..57d43006925975d36d29b7b09a07b25b01312bca 100644 (file)
@@ -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);
        }
 
 }
index 12764396a2eaaa63003760992f93d96043bfa051..5602c6ed9566eda3706f0b1cc3a531a9694bb672 100644 (file)
@@ -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);
        }
 
 }
index 96e30b98a47897935f9bfe6b7176f8b88cef31ca..81fb424c9c4340a70660af3ae23778dc2fd4f9f9 100644 (file)
@@ -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);
        }
 
 }
index 7a1ac22774850bdc7308c0ca047cf8a9fea5f469..15df039837145ac8468332b2a6e83996557bc5fc 100644 (file)
@@ -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);
        }
 
 }
index 1554b6faa66940954b91d7c6785bda8f314d9715..81acc7e7c2df84f46eaefbe79475850afa5d8db9 100644 (file)
@@ -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);
        }
 
 }
index 978320dd9521c39720401adc0680e6e7a4fe18f3..8365c8d157a34347b05a8ef8e13581fb4617507a 100644 (file)
@@ -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);
        }
 
 }
index 8ec20d1dce5e12a01dd9a55d2bd4ae1b719e4f6b..62bd3fb8d4c2dd50edfab8de9e3c46f3cd88edda 100644 (file)
@@ -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);
        }
 
 }
index a36e3547a67aec374bbab5459c8ddea4e796b405..a496f2e021a7a71bfdac71523314f888d63bca69 100644 (file)
@@ -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);
        }
 
        /**