From 0b0300d10ec4abc756f914325d4e47279904a03a Mon Sep 17 00:00:00 2001 From: Simon Asika Date: Fri, 26 Jan 2024 15:33:14 +0800 Subject: [PATCH] interface fixes --- src/Stream/RequestBodyStream.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Stream/RequestBodyStream.php b/src/Stream/RequestBodyStream.php index 485df8b..8963ee3 100644 --- a/src/Stream/RequestBodyStream.php +++ b/src/Stream/RequestBodyStream.php @@ -106,11 +106,9 @@ public function isSeekable(): bool * * @return mixed */ - public function seek($offset, $whence = SEEK_SET): mixed + public function seek($offset, $whence = SEEK_SET): void { $this->cursor = $offset; - - return true; } /** @@ -118,11 +116,9 @@ public function seek($offset, $whence = SEEK_SET): mixed * * @return mixed */ - public function rewind(): mixed + public function rewind(): void { $this->cursor = 0; - - return true; } /** @@ -142,7 +138,7 @@ public function isWritable(): bool * * @return int */ - public function write($string): ?int + public function write($string): int { if (is_string($string)) { $this->data = UriHelper::parseQuery($string); @@ -150,7 +146,7 @@ public function write($string): ?int $this->data = (array) $string; } - return $this->getSize(); + return (int) $this->getSize(); } /**