@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | protected function encode($key) |
374 | 374 | { |
375 | 375 | $regex = '/[^\x21\x22\x24\x26-\x39\x3b-\x7e]+/'; |
376 | - $key = preg_replace_callback($regex, function ($match) { |
|
376 | + $key = preg_replace_callback($regex, function($match) { |
|
377 | 377 | return rawurlencode($match[0]); |
378 | 378 | }, $key); |
379 | 379 | |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | // (=the encoded versions for those encoded in encode) |
398 | 398 | $regex = '/%(?!2[1246789]|3[0-9]|3[B-F]|[4-6][0-9A-F]|5[0-9A-E])[0-9A-Z]{2}/i'; |
399 | 399 | |
400 | - return preg_replace_callback($regex, function ($match) { |
|
400 | + return preg_replace_callback($regex, function($match) { |
|
401 | 401 | return rawurldecode($match[0]); |
402 | 402 | }, $key); |
403 | 403 | } |
@@ -381,7 +381,7 @@ |
||
381 | 381 | |
382 | 382 | $units = array('B' => 1024, 'M' => pow(1024, 2), 'G' => pow(1024, 3)); |
383 | 383 | |
384 | - return (int) preg_replace_callback('/^([0-9]+)('.implode('|', array_keys($units)).')$/', function ($match) use ($units) { |
|
384 | + return (int) preg_replace_callback('/^([0-9]+)('.implode('|', array_keys($units)).')$/', function($match) use ($units) { |
|
385 | 385 | return $match[1] * $units[$match[2]]; |
386 | 386 | }, $shorthand); |
387 | 387 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | * @return bool |
192 | 192 | */ |
193 | 193 | $cache = $this->cache; |
194 | - $callback = function ($originalValue, $key, $value, $expire) use ($cache) { |
|
194 | + $callback = function($originalValue, $key, $value, $expire) use ($cache) { |
|
195 | 195 | // check if given (local) CAS token was known |
196 | 196 | if (null === $originalValue) { |
197 | 197 | return false; |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | * @param int $expire |
501 | 501 | * @return bool |
502 | 502 | */ |
503 | - $callback = function ($items, $expire) use ($cache) { |
|
503 | + $callback = function($items, $expire) use ($cache) { |
|
504 | 504 | $success = $cache->setMulti($items, $expire); |
505 | 505 | |
506 | 506 | return !in_array(false, $success); |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | * @param string[] $keys |
524 | 524 | * @return bool |
525 | 525 | */ |
526 | - $callback = function ($keys) use ($cache) { |
|
526 | + $callback = function($keys) use ($cache) { |
|
527 | 527 | $cache->deleteMulti($keys); |
528 | 528 | |
529 | 529 | return true; |