From 113756db30fcbffe9e90b54c29e78dee0676109f Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 19 Oct 2021 17:11:53 +0200 Subject: Fix ArrayAccess and JsonSerializable return types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First round of modifications for PHP 8.1 Signed-off-by: Côme Chilliet --- lib/private/Memcache/Cache.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/private/Memcache') diff --git a/lib/private/Memcache/Cache.php b/lib/private/Memcache/Cache.php index 95213c16849..1d54a705098 100644 --- a/lib/private/Memcache/Cache.php +++ b/lib/private/Memcache/Cache.php @@ -78,19 +78,23 @@ abstract class Cache implements \ArrayAccess, \OCP\ICache { //implement the ArrayAccess interface - public function offsetExists($offset) { + public function offsetExists($offset): bool { return $this->hasKey($offset); } - public function offsetSet($offset, $value) { + public function offsetSet($offset, $value): void { $this->set($offset, $value); } + /** + * @return mixed + */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->get($offset); } - public function offsetUnset($offset) { + public function offsetUnset($offset): void { $this->remove($offset); } } -- cgit v1.2.3