* @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);
}
* @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);
}
* @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);
}
* @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);
}
* @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);
}
* @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);
}
* @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);
}
* @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);