aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Memcache/Cache.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Memcache/Cache.php')
-rw-r--r--lib/private/Memcache/Cache.php39
1 files changed, 14 insertions, 25 deletions
diff --git a/lib/private/Memcache/Cache.php b/lib/private/Memcache/Cache.php
index fe141b7bf19..774769b25fe 100644
--- a/lib/private/Memcache/Cache.php
+++ b/lib/private/Memcache/Cache.php
@@ -1,30 +1,15 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Lukas Reschke <lukas@statuscode.ch>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <robin@icewind.nl>
- * @author Robin McCorkell <robin@mccorkell.me.uk>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OC\Memcache;
+/**
+ * @template-implements \ArrayAccess<string,mixed>
+ */
abstract class Cache implements \ArrayAccess, \OCP\ICache {
/**
* @var string $prefix
@@ -79,19 +64,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);
}
}