From fc02573fe5ea69f786389052b8c461c376a9d1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=93=D1=80?= =?UTF-8?q?=D0=B8=D1=88=D0=B0=D0=B3=D0=B8=D0=BD?= Date: Tue, 2 Jul 2024 11:35:03 +0300 Subject: [PATCH] ReturnTypeWillChange instead type hint --- lib/RetailCrm/Response/ApiResponse.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/RetailCrm/Response/ApiResponse.php b/lib/RetailCrm/Response/ApiResponse.php index 3ac5975..2cb9c2a 100644 --- a/lib/RetailCrm/Response/ApiResponse.php +++ b/lib/RetailCrm/Response/ApiResponse.php @@ -171,7 +171,8 @@ class ApiResponse implements \ArrayAccess * @throws \BadMethodCallException * @return void */ - public function offsetSet(mixed $offset, mixed $value): void + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) { throw new \BadMethodCallException('This activity not allowed'); } @@ -184,7 +185,8 @@ class ApiResponse implements \ArrayAccess * @throws \BadMethodCallException * @return void */ - public function offsetUnset(mixed $offset): void + #[\ReturnTypeWillChange] + public function offsetUnset($offset) { throw new \BadMethodCallException('This call not allowed'); } @@ -196,7 +198,8 @@ class ApiResponse implements \ArrayAccess * * @return bool */ - public function offsetExists(mixed $offset): bool + #[\ReturnTypeWillChange] + public function offsetExists($offset) { return isset($this->response[$offset]); } @@ -210,7 +213,8 @@ class ApiResponse implements \ArrayAccess * * @return mixed */ - public function offsetGet(mixed $offset): mixed + #[\ReturnTypeWillChange] + public function offsetGet($offset) { if (!isset($this->response[$offset])) { throw new \InvalidArgumentException("Property \"$offset\" not found");