From 8557e30c478c289b89a8dc241eb55b838aead662 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 17 May 2014 23:54:36 +0200 Subject: [PATCH] Removed asserts as they seem to be to hard and returned status code instead. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../interfaces/io/pointer/io/class_InputOutputPointer.php | 4 ++-- .../iterator/class_SeekableWritableFileIterator.php | 2 +- .../interfaces/stacker/file/class_StackableFile.php | 2 +- .../io/class_FrameworkFileInputOutputPointer.php | 8 ++++---- inc/classes/main/iterator/io/class_FileIoIterator.php | 8 ++++---- .../main/stacker/file/fifo/class_FiFoFileStack.php | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/inc/classes/interfaces/io/pointer/io/class_InputOutputPointer.php b/inc/classes/interfaces/io/pointer/io/class_InputOutputPointer.php index 8be63510..b901c1b4 100644 --- a/inc/classes/interfaces/io/pointer/io/class_InputOutputPointer.php +++ b/inc/classes/interfaces/io/pointer/io/class_InputOutputPointer.php @@ -25,7 +25,7 @@ interface InputOutputPointer extends InputPointer, OutputPointer { /** * Rewinds to the beginning of the file * - * @return void + * @return $status Status of this operation */ function rewind (); @@ -34,7 +34,7 @@ interface InputOutputPointer extends InputPointer, OutputPointer { * * @param $seekPosition Seek position in file * @param $whence "Seek mode" (see http://de.php.net/fseek) - * @return void + * @return $tatus Status of this operation */ function seek ($seekPosition, $whence = SEEK_SET); diff --git a/inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php b/inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php index ab64d366..1dde2c27 100644 --- a/inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php +++ b/inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php @@ -27,7 +27,7 @@ interface SeekableWritableFileIterator extends SeekableIterator { * Seeks to given position * * @param $seekPosition Seek position in file - * @return void + * @return $status Status of this operation */ function seek ($seekPosition); diff --git a/inc/classes/interfaces/stacker/file/class_StackableFile.php b/inc/classes/interfaces/stacker/file/class_StackableFile.php index 01537288..9fa6c5b4 100644 --- a/inc/classes/interfaces/stacker/file/class_StackableFile.php +++ b/inc/classes/interfaces/stacker/file/class_StackableFile.php @@ -26,7 +26,7 @@ interface StackableFile extends Stackable { * Seeks to given position * * @param $seekPosition Seek position in file - * @return void + * @return $status Status of this operation */ function seek ($seekPosition); diff --git a/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php b/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php index b167fee3..198c5b09 100644 --- a/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php +++ b/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php @@ -121,11 +121,11 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP /** * Rewinds to the beginning of the file * - * @return void + * @return $status Status of this operation */ public function rewind () { // Rewind the pointer - assert(rewind($this->getPointer()) === 1); + return rewind($this->getPointer()); } /** @@ -133,11 +133,11 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP * * @param $seekPosition Seek position in file * @param $whence "Seek mode" (see http://de.php.net/fseek) - * @return void + * @return $status Status of this operation */ public function seek ($seekPosition, $whence = SEEK_SET) { // Move the file pointer - assert(fseek($this->getPointer(), $seekPosition, $whence) === 0); + return fseek($this->getPointer(), $seekPosition, $whence); } } diff --git a/inc/classes/main/iterator/io/class_FileIoIterator.php b/inc/classes/main/iterator/io/class_FileIoIterator.php index f1434231..af4c1b47 100644 --- a/inc/classes/main/iterator/io/class_FileIoIterator.php +++ b/inc/classes/main/iterator/io/class_FileIoIterator.php @@ -86,22 +86,22 @@ class FileIoIterator extends BaseIterator implements SeekableWritableFileIterato /** * Rewinds to the beginning of the file * - * @return void + * @return $status Status of this operation */ public function rewind () { // Call pointer instance - $this->getPointerInstance()->rewind(); + return $this->getPointerInstance()->rewind(); } /** * Seeks to given position * * @param $seekPosition Seek position in file - * @return void + * @return $status Status of this operation */ public function seek ($seekPosition) { // Call pointer instance - $this->getPointerInstance()->seek($seekPosition); + return $this->getPointerInstance()->seek($seekPosition); } /** diff --git a/inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php b/inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php index e7774a0f..1a81058c 100644 --- a/inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php +++ b/inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php @@ -89,7 +89,7 @@ class FiFoFileStack extends BaseFileStack implements StackableFile { * Seeks to given position * * @param $seekPosition Seek position in file - * @return void + * @return $status Status of this operation */ public function seek ($seekPosition) { $this->partialStub('seekPosition=' . $seekPosition); -- 2.39.5