]> git.mxchange.org Git - core.git/commitdiff
Removed asserts as they seem to be to hard and returned status code instead.
authorRoland Haeder <roland@mxchange.org>
Sat, 17 May 2014 21:54:36 +0000 (23:54 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 17 May 2014 21:54:36 +0000 (23:54 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/interfaces/io/pointer/io/class_InputOutputPointer.php
inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php
inc/classes/interfaces/stacker/file/class_StackableFile.php
inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php
inc/classes/main/iterator/io/class_FileIoIterator.php
inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php

index 8be635101a78c2e7bf488c95a12a2b0ec60ea96d..b901c1b472819c6c01dc1b0f7088e9a1ad9ac2c6 100644 (file)
@@ -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);
 
index ab64d36626f43f95964003e3d871383bcd48007e..1dde2c27235b52e32bc25e46cbefa1959e56d10d 100644 (file)
@@ -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);
 
index 01537288fa0575d2ef490d475664e796458d9a2a..9fa6c5b4cf40946ada8595edf7660476a6e7359f 100644 (file)
@@ -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);
 
index b167fee3d363d409865c577e24500c5d2e9534d7..198c5b09df6c463f8bcdd9a4ee8f84b1d24f7bad 100644 (file)
@@ -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);
        }
 }
 
index f14342317dd9daebf246d0ca1fcfc84ded6517b3..af4c1b47f8b8174a176a7faa7626a72a7de1665f 100644 (file)
@@ -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);
        }
 
        /**
index e7774a0f3625e30f518de06f40cc49ae533d3704..1a81058cd4924602f5c5c62f188375b78845b33d 100644 (file)
@@ -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);