@@ -77,7 +77,9 @@ public function __construct($persistentId)
7777 static ::$ locksBackup [$ this ->persistentId ] = array ();
7878 }
7979 register_shutdown_function (
80- get_called_class () . '::releaseLocks ' , $ this ->persistentId , true
80+ get_called_class () . '::releaseLocks ' ,
81+ $ this ->persistentId ,
82+ true
8183 );
8284 }
8385
@@ -170,7 +172,9 @@ public function unlock($key)
170172 $ success = apc_delete ($ lock );
171173 if ($ success ) {
172174 unset(static ::$ locksBackup [$ this ->persistentId ][array_search (
173- $ key , static ::$ locksBackup [$ this ->persistentId ], true
175+ $ key ,
176+ static ::$ locksBackup [$ this ->persistentId ],
177+ true
174178 )]);
175179 return true ;
176180 }
@@ -241,7 +245,8 @@ public function get($key)
241245 throw new SHM \InvalidArgumentException (
242246 'Unable to fetch key. ' .
243247 'Key has either just now expired or (if no TTL was set) ' .
244- 'is possibly in a race condition with another request. ' , 100
248+ 'is possibly in a race condition with another request. ' ,
249+ 100
245250 );
246251 }
247252 return $ value ;
@@ -276,7 +281,9 @@ public function delete($key)
276281 public function inc ($ key , $ step = 1 )
277282 {
278283 $ newValue = apc_inc (
279- $ this ->persistentId . 'd ' . $ key , (int ) $ step , $ success
284+ $ this ->persistentId . 'd ' . $ key ,
285+ (int ) $ step ,
286+ $ success
280287 );
281288 if (!$ success ) {
282289 throw new SHM \InvalidArgumentException (
@@ -302,7 +309,9 @@ public function inc($key, $step = 1)
302309 public function dec ($ key , $ step = 1 )
303310 {
304311 $ newValue = apc_dec (
305- $ this ->persistentId . 'd ' . $ key , (int ) $ step , $ success
312+ $ this ->persistentId . 'd ' . $ key ,
313+ (int ) $ step ,
314+ $ success
306315 );
307316 if (!$ success ) {
308317 throw new SHM \InvalidArgumentException (
@@ -387,4 +396,4 @@ public function getIterator($filter = null, $keysOnly = false)
387396 }
388397 return $ result ;
389398 }
390- }
399+ }
0 commit comments