summaryrefslogtreecommitdiffstats
path: root/lib/private/Cache/CappedMemoryCache.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2021-10-19 17:11:53 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2021-11-23 09:28:56 +0100
commit113756db30fcbffe9e90b54c29e78dee0676109f (patch)
tree8eeaad5ea33957cd2c9ef37dbb05c5e779c48216 /lib/private/Cache/CappedMemoryCache.php
parent129de6079e53e0ac9dbf9d7c25ec1670ae0ff572 (diff)
downloadnextcloud-server-113756db30fcbffe9e90b54c29e78dee0676109f.tar.gz
nextcloud-server-113756db30fcbffe9e90b54c29e78dee0676109f.zip
Fix ArrayAccess and JsonSerializable return types
First round of modifications for PHP 8.1 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Cache/CappedMemoryCache.php')
-rw-r--r--lib/private/Cache/CappedMemoryCache.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/private/Cache/CappedMemoryCache.php b/lib/private/Cache/CappedMemoryCache.php
index 408c3935ffb..584a53f0ff2 100644
--- a/lib/private/Cache/CappedMemoryCache.php
+++ b/lib/private/Cache/CappedMemoryCache.php
@@ -63,19 +63,23 @@ class CappedMemoryCache implements ICache, \ArrayAccess {
return true;
}
- public function offsetExists($offset) {
+ public function offsetExists($offset): bool {
return $this->hasKey($offset);
}
+ /**
+ * @return mixed
+ */
+ #[\ReturnTypeWillChange]
public function &offsetGet($offset) {
return $this->cache[$offset];
}
- public function offsetSet($offset, $value) {
+ public function offsetSet($offset, $value): void {
$this->set($offset, $value);
}
- public function offsetUnset($offset) {
+ public function offsetUnset($offset): void {
$this->remove($offset);
}