From e8ffee08a84485759f0f9187f287a9df87a0f086 Mon Sep 17 00:00:00 2001 From: argiepiano Date: Sun, 27 Aug 2023 08:01:32 -0600 Subject: [PATCH] Issue #14. Add #[\ReturnTypeWillChange] to methods that extend ArrayAccess Fixes #14 --- plugins/adapter.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/adapter.inc b/plugins/adapter.inc index 3411c45..64f72b7 100644 --- a/plugins/adapter.inc +++ b/plugins/adapter.inc @@ -1172,13 +1172,15 @@ class FacetapiFacet implements ArrayAccess { /** * Implements ArrayAccess::offsetExists(). */ - public function offsetExists($offset) { + #[\ReturnTypeWillChange] + public function offsetExists($offset) { return isset($this->facet[$offset]); } /** * Implements ArrayAccess::offsetGet(). */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->facet[$offset]) ? $this->facet[$offset] : NULL; } @@ -1186,6 +1188,7 @@ class FacetapiFacet implements ArrayAccess { /** * Implements ArrayAccess::offsetSet(). */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (NULL === $offset) { $this->facet[] = $value; @@ -1198,6 +1201,7 @@ class FacetapiFacet implements ArrayAccess { /** * Implements ArrayAccess::offsetUnset(). */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->facet[$offset]); }