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.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Lock/MemcacheLockingProvider.php b/lib/private/Lock/MemcacheLockingProvider.php
index 6cab64b3a02..2c2d8a95938 100644
--- a/lib/private/Lock/MemcacheLockingProvider.php
+++ b/lib/private/Lock/MemcacheLockingProvider.php
@@ -60,7 +60,7 @@ class MemcacheLockingProvider extends AbstractLockingProvider {
$lockValue = $this->memcache->get($path);
if ($type === self::LOCK_SHARED) {
return $lockValue > 0;
- } else if ($type === self::LOCK_EXCLUSIVE) {
+ } elseif ($type === self::LOCK_EXCLUSIVE) {
return $lockValue === 'exclusive';
} else {
return false;
@@ -108,7 +108,7 @@ class MemcacheLockingProvider extends AbstractLockingProvider {
if ($newValue < 0) {
$this->memcache->cad($path, $newValue);
}
- } else if ($type === self::LOCK_EXCLUSIVE) {
+ } elseif ($type === self::LOCK_EXCLUSIVE) {
$this->memcache->cad($path, 'exclusive');
}
$this->markRelease($path, $type);
@@ -126,7 +126,7 @@ class MemcacheLockingProvider extends AbstractLockingProvider {
if (!$this->memcache->cas($path, 'exclusive', 1)) {
throw new LockedException($path, null, $this->getExistingLockForException($path));
}
- } else if ($targetType === self::LOCK_EXCLUSIVE) {
+ } elseif ($targetType === self::LOCK_EXCLUSIVE) {
// we can only change a shared lock to an exclusive if there's only a single owner of the shared lock
if (!$this->memcache->cas($path, 1, 'exclusive')) {
throw new LockedException($path, null, $this->getExistingLockForException($path));
@@ -140,7 +140,7 @@ class MemcacheLockingProvider extends AbstractLockingProvider {
$existing = $this->memcache->get($path);
if (!$existing) {
return 'none';
- } else if ($existing === 'exclusive') {
+ } elseif ($existing === 'exclusive') {
return $existing;
} else {
return $existing . ' shared locks';