Skip to content

Commit c077b0b

Browse files
author
Willem Stuursma-Ruwen
authored
Merge pull request #15 from willemstuursma/master
Use PHP5.6 style splat operator, fix two typos
2 parents 78533b1 + 575d9c9 commit c077b0b

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

classes/mutex/Mutex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ abstract class Mutex
3030
* @return mixed The return value of the execution block.
3131
*
3232
* @throws \Exception The execution block threw an exception.
33-
* @throws LockAcquireException The mutex could not be aquired, no further side effects.
33+
* @throws LockAcquireException The mutex could not be acquired, no further side effects.
3434
* @throws LockReleaseException The mutex could not be released, the code was already executed.
3535
*/
3636
abstract public function synchronized(callable $code);

classes/mutex/PredisMutex.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ protected function add($client, $key, $value, $expire)
5959
protected function evalScript($client, $script, $numkeys, array $arguments)
6060
{
6161
try {
62-
return call_user_func_array(
63-
[$client, "eval"],
64-
array_merge([$script, $numkeys], $arguments)
65-
);
62+
return $client->eval(...array_merge([$script, $numkeys], $arguments));
6663
} catch (PredisException $e) {
6764
$message = sprintf(
6865
"Failed to release lock at %s",

classes/util/DoubleCheckedLocking.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function setCheck(callable $check)
5959
* @param callable $code The locked code.
6060
*
6161
* @throws \Exception The execution block or the check threw an exception.
62-
* @throws LockAcquireException The mutex could not be aquired.
62+
* @throws LockAcquireException The mutex could not be acquired.
6363
* @throws LockReleaseException The mutex could not be released.
6464
*/
6565
public function then(callable $code)

0 commit comments

Comments
 (0)