Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
56 | public function releaseLock($lockName, $identifier) |
||
57 | { |
||
58 | $luaScript = <<<LUA |
||
59 | if redis.call("get",KEYS[1]) == ARGV[1] then |
||
60 | return redis.call("del",KEYS[1]) |
||
61 | else |
||
62 | return 0 |
||
63 | end |
||
64 | LUA; |
||
65 | |||
66 | return $this->client->eval($luaScript, 1, $lockName, $identifier) ? true : false; |
||
67 | } |
||
68 | } |