Skip to content

Commit 25c6703

Browse files
committed
Use short array deconstruction syntax.
1 parent 160e598 commit 25c6703

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Store/MemcachedStore.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function putOffExpiration(Key $key, $ttl)
9494

9595
$token = $this->getUniqueToken($key);
9696

97-
list($value, $cas) = $this->getValueAndCas($key);
97+
[$value, $cas] = $this->getValueAndCas($key);
9898

9999
$key->reduceLifetime($ttl);
100100
// Could happens when we ask a putOff after a timeout but in luck nobody steal the lock
@@ -126,7 +126,7 @@ public function delete(Key $key)
126126
{
127127
$token = $this->getUniqueToken($key);
128128

129-
list($value, $cas) = $this->getValueAndCas($key);
129+
[$value, $cas] = $this->getValueAndCas($key);
130130

131131
if ($value !== $token) {
132132
// we are not the owner of the lock. Nothing to do.

Tests/Store/SemaphoreStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private function getOpenedSemaphores()
6060
if ('------ Semaphore Status --------' !== $lines[0]) {
6161
throw new \Exception('Failed to extract list of opened semaphores. Expected a Semaphore status, got '.implode(\PHP_EOL, $lines));
6262
}
63-
list($key, $value) = explode(' = ', $lines[1]);
63+
[$key, $value] = explode(' = ', $lines[1]);
6464
if ('used arrays' !== $key) {
6565
throw new \Exception('Failed to extract list of opened semaphores. Expected a "used arrays" key, got '.implode(\PHP_EOL, $lines));
6666
}

0 commit comments

Comments
 (0)