]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/iterator/file/class_FileIterator.php
Continued:
[core.git] / framework / main / classes / iterator / file / class_FileIterator.php
index ad9338a2daaf15f983b5173120b6e575f1146b2d..ff14542e96be872985e4a662d20f1501a7b11f50 100644 (file)
@@ -139,7 +139,7 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
         * @param       $seekPosition   Seek position in file
         * @return      $status                 Status of this operation
         */
-       public function seek ($seekPosition) {
+       public function seek (int $seekPosition) {
                // Call block instance
                return $this->getBlockInstance()->seek($seekPosition);
        }
@@ -163,7 +163,7 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
         * @param       $bytes  Amount of bytes to read
         * @return      $data   Data read from file
         */
-       public function read ($bytes = NULL) {
+       public function read (int $bytes = NULL) {
                // Call block instance
                return $this->getBlockInstance()->read($bytes);
        }
@@ -206,7 +206,7 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
         * @param       $type   Type of the file
         * @return      void
         */
-       public function preAllocateFile ($type) {
+       public function preAllocateFile (string $type) {
                // Just call the block instance
                $this->getBlockInstance()->preAllocateFile($type);
        }
@@ -240,7 +240,7 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
         * @param       $headerSize             Size of file header
         * @return      void
         */
-       public final function setHeaderSize ($headerSize) {
+       public final function setHeaderSize (int $headerSize) {
                // Call block instance
                $this->getBlockInstance()->setHeaderSize($headerSize);
        }
@@ -304,7 +304,7 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
         * @param       $flushHeader    Whether to flush the header (default: flush)
         * @return      void
         */
-       public function writeData ($seekPosition, $data, $flushHeader = true) {
+       public function writeData (int $seekPosition, string $data, bool $flushHeader = true) {
                // Call block instance
                $this->getBlockInstance()->writeData($seekPosition, $data, $flushHeader);
        }
@@ -326,7 +326,7 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
         * @param       $value          Value to be added to the stack
         * @return      $data           Hash and gap position
         */
-       public function writeValueToFile ($groupId, $value) {
+       public function writeValueToFile (string $groupId, $value) {
                // Call block instance
                return $this->getBlockInstance()->writeValueToFile($groupId, $value);
        }
@@ -339,7 +339,7 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
         * @param       $encoded        Encoded value to be written to the file
         * @return      $data           Gap position and length of the raw data
         */
-       public function writeDataToFreeGap ($groupId, $hash, $encoded) {
+       public function writeDataToFreeGap (string $groupId, string $hash, string $encoded) {
                // Call block instance
                return $this->getBlockInstance()->writeDataToFreeGap($groupId, $hash, $encoded);
        }
@@ -351,7 +351,7 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
         * @param       $length                 Length of raw data
         * @return      $seekPosition   Found next gap's seek position
         */
-       public function searchNextGap ($length) {
+       public function searchNextGap (int $length) {
                // Call block instance
                print $this->getBlockInstance()->__toString() . PHP_EOL;
                return $this->getBlockInstance()->searchNextGap($length);