diff --git a/protocol/src/main/resources/php/ByteBuffer.php b/protocol/src/main/resources/php/ByteBuffer.php index 01875dea7..6067ab17c 100644 --- a/protocol/src/main/resources/php/ByteBuffer.php +++ b/protocol/src/main/resources/php/ByteBuffer.php @@ -61,8 +61,8 @@ public function getWriteOffset(): int public function setWriteOffset(int $writeIndex): void { if ($writeIndex > strlen($this->buffer)) { - throw new Exception("writeIndex[" . $writeIndex . "] out of bounds exception: readerIndex: " . $this->readOffset . - ", writerIndex: " . $this->writeOffset . "(expected: 0 <= readerIndex <= writerIndex <= capacity:" . strlen($this->buffer)); + throw new Exception("writeIndex[" . $writeIndex . "] out of bounds exception: readOffset: " . $this->readOffset . + ", writeOffset: " . $this->writeOffset . "(expected: 0 <= readOffset <= writeOffset <= capacity:" . strlen($this->buffer) . ")"); } $this->writeOffset = $writeIndex; } @@ -78,8 +78,8 @@ public function getReadOffset(): int public function setReadOffset(int $readIndex): void { if ($readIndex > $this->writeOffset) { - throw new Exception("readIndex[" . $readIndex . "] out of bounds exception: readerIndex: " . $this->readOffset . - ", writerIndex: " . $this->writeOffset . "(expected: 0 <= readerIndex <= writerIndex <= capacity:" . strlen($this->buffer)); + throw new Exception("readIndex[" . $readIndex . "] out of bounds exception: readOffset: " . $this->readOffset . + ", writeOffset: " . $this->writeOffset . "(expected: 0 <= readOffset <= writeOffset <= capacity:" . strlen($this->buffer)); } $this->readOffset = $readIndex; } diff --git a/protocol/src/test/php/zfoophp/ByteBuffer.php b/protocol/src/test/php/zfoophp/ByteBuffer.php index 01875dea7..6067ab17c 100644 --- a/protocol/src/test/php/zfoophp/ByteBuffer.php +++ b/protocol/src/test/php/zfoophp/ByteBuffer.php @@ -61,8 +61,8 @@ public function getWriteOffset(): int public function setWriteOffset(int $writeIndex): void { if ($writeIndex > strlen($this->buffer)) { - throw new Exception("writeIndex[" . $writeIndex . "] out of bounds exception: readerIndex: " . $this->readOffset . - ", writerIndex: " . $this->writeOffset . "(expected: 0 <= readerIndex <= writerIndex <= capacity:" . strlen($this->buffer)); + throw new Exception("writeIndex[" . $writeIndex . "] out of bounds exception: readOffset: " . $this->readOffset . + ", writeOffset: " . $this->writeOffset . "(expected: 0 <= readOffset <= writeOffset <= capacity:" . strlen($this->buffer) . ")"); } $this->writeOffset = $writeIndex; } @@ -78,8 +78,8 @@ public function getReadOffset(): int public function setReadOffset(int $readIndex): void { if ($readIndex > $this->writeOffset) { - throw new Exception("readIndex[" . $readIndex . "] out of bounds exception: readerIndex: " . $this->readOffset . - ", writerIndex: " . $this->writeOffset . "(expected: 0 <= readerIndex <= writerIndex <= capacity:" . strlen($this->buffer)); + throw new Exception("readIndex[" . $readIndex . "] out of bounds exception: readOffset: " . $this->readOffset . + ", writeOffset: " . $this->writeOffset . "(expected: 0 <= readOffset <= writeOffset <= capacity:" . strlen($this->buffer)); } $this->readOffset = $readIndex; }