aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Lock/MemcacheLockingProvider.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Lock/MemcacheLockingProvider.php')
-rw-r--r--lib/private/Lock/MemcacheLockingProvider.php31
1 files changed, 6 insertions, 25 deletions
diff --git a/lib/private/Lock/MemcacheLockingProvider.php b/lib/private/Lock/MemcacheLockingProvider.php
index bc0ea989cbd..8cc0c27bbf9 100644
--- a/lib/private/Lock/MemcacheLockingProvider.php
+++ b/lib/private/Lock/MemcacheLockingProvider.php
@@ -1,29 +1,10 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Jaakko Salo <jaakkos@gmail.com>
- * @author Robin Appelman <robin@icewind.nl>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\Lock;
@@ -44,7 +25,7 @@ class MemcacheLockingProvider extends AbstractLockingProvider {
parent::__construct($ttl);
}
- private function setTTL(string $path, ?int $ttl = null, ?int $compare = null): void {
+ private function setTTL(string $path, ?int $ttl = null, mixed $compare = null): void {
if (is_null($ttl)) {
$ttl = $this->ttl;
}
@@ -81,8 +62,8 @@ class MemcacheLockingProvider extends AbstractLockingProvider {
if ($type === self::LOCK_SHARED) {
// save the old TTL to for `restoreTTL`
$this->oldTTLs[$path] = [
- "ttl" => $this->getTTL($path),
- "time" => $this->timeFactory->getTime()
+ 'ttl' => $this->getTTL($path),
+ 'time' => $this->timeFactory->getTime()
];
if (!$this->memcache->inc($path)) {
throw new LockedException($path, null, $this->getExistingLockForException($path), $readablePath);