From bb1f370e1667fa1251710d5b5c4be1c3e225e40b Mon Sep 17 00:00:00 2001 From: Claus-Justus Heine Date: Fri, 23 Jun 2023 01:17:24 +0200 Subject: [PATCH] Fix \ArrayAccess type warnings Signed-off-by: Claus-Justus Heine --- lib/Properties.php | 8 ++++---- lib/Query/QueryProvider.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Properties.php b/lib/Properties.php index d30ae1a..762ce3c 100644 --- a/lib/Properties.php +++ b/lib/Properties.php @@ -203,7 +203,7 @@ class Properties implements \ArrayAccess /** * @inheritdoc */ - public function offsetExists($offset) + public function offsetExists(mixed $offset):bool { return isset($this->data[$offset]); } @@ -211,7 +211,7 @@ class Properties implements \ArrayAccess /** * @inheritdoc */ - public function offsetGet($offset) + public function offsetGet(mixed $offset):mixed { if (isset($this->data[$offset])) { return $this->data[$offset]; @@ -223,7 +223,7 @@ class Properties implements \ArrayAccess /** * @inheritdoc */ - public function offsetSet($offset, $value) + public function offsetSet(mixed $offset, mixed $value):void { if ($offset == Opt::SAFE_STORE) { $this->safeStore = ($value === App::TRUE_VALUE); @@ -255,7 +255,7 @@ class Properties implements \ArrayAccess /** * @inheritdoc */ - public function offsetUnset($offset) + public function offsetUnset(mixed $offset):void { if ($offset == Opt::SAFE_STORE) { $this->safeStore = App::FALSE_VALUE; diff --git a/lib/Query/QueryProvider.php b/lib/Query/QueryProvider.php index 0a1f9c1..f4834ff 100644 --- a/lib/Query/QueryProvider.php +++ b/lib/Query/QueryProvider.php @@ -238,7 +238,7 @@ class QueryProvider implements \ArrayAccess /** * @inheritdoc */ - public function offsetExists($offset) + public function offsetExists(mixed $offset):bool { return isset($this->queries[$offset]); } @@ -246,7 +246,7 @@ class QueryProvider implements \ArrayAccess /** * @inheritdoc */ - public function offsetGet($offset) + public function offsetGet(mixed $offset):mixed { if (isset($this->queries[$offset])) { return $this->queries[$offset]; @@ -258,7 +258,7 @@ class QueryProvider implements \ArrayAccess /** * @inheritdoc */ - public function offsetSet($offset, $value) + public function offsetSet(mixed $offset, mixed $value):void { $this->queries[$offset] = $value; } @@ -266,7 +266,7 @@ class QueryProvider implements \ArrayAccess /** * @inheritdoc */ - public function offsetUnset($offset) + public function offsetUnset(mixed $offset):void { unset($this->queries[$offset]); }