X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=framework%2Fmain%2Fclasses%2Ffile_directories%2Foutput%2Ftext%2Fclass_FrameworkTextFileOutputPointer.php;h=f65872571089aabbbbabf317a30dd522c75671f4;hb=HEAD;hp=a70f7586b870dbd07a491c2688d0f38e17cb8809;hpb=5c9360c9139b761d2b09351930c1e843d33af240;p=core.git 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 a70f7586..fa968671 100644 --- a/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php +++ b/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php @@ -20,7 +20,7 @@ use \SplFileObject; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -56,9 +56,9 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @param $mode The output mode ('w', 'a' are valid) * @throws InvalidArgumentException If mode is empty * @throws FileIoException If fopen() returns not a file resource - * @return void + * @return FrameworkTextFileOutputPointer An instance of a FrameworkTextFileOutputPointer class */ - public static final function createFrameworkTextFileOutputPointer (SplFileInfo $fileInstance, string $mode) { + public static final function createFrameworkTextFileOutputPointer (SplFileInfo $fileInstance, string $mode): FrameworkTextFileOutputPointer { // Some pre-sanity checks... /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TEXT-FILE-OUTPUT-POINTER: fileInstance[%s]=%s,mode=%s - CALLED!', get_class($fileInstance), $fileInstance->__toString(), $mode)); if (empty($mode)) { @@ -103,7 +103,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT); } elseif (is_null($this->getFileObject())) { // Pointer not initialized - throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER); + throw new NullPointerException($this, FrameworkInterface::EXCEPTION_IS_NULL_POINTER); } elseif (!is_object($this->getFileObject())) { // Pointer is not a valid object! throw new LogicException(sprintf('this->fileObject[]=%s is no object', gettype($this->getFileObject())), FrameworkInterface::EXCEPTION_LOGIC_EXCEPTION); @@ -121,8 +121,8 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @return void * @throws UnsupportedOperationException If this method is called */ - public function analyzeFileStructure () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + public function analyzeFileStructure (): void { + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -134,7 +134,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function writeAtPosition (int $seedPosition, string $data) { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -143,8 +143,8 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @return void * @throws UnsupportedOperationException If this method is called */ - public function next () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + public function next (): void { + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -154,8 +154,8 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @return $isValid Whether the next entry is valid * @throws UnsupportedOperationException If this method is called */ - public function valid () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + public function valid (): bool { + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -164,8 +164,8 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @return $key Current key in iteration * @throws UnsupportedOperationException If this method is called */ - public function key () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + public function key (): int { + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } }