@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | class MemcachedCache implements CacheInterface |
10 | 10 | { |
11 | 11 | |
12 | - const PSR16_RESERVED_CHARACTERS = ['{','}','(',')','/','@',':']; |
|
12 | + const PSR16_RESERVED_CHARACTERS = ['{', '}', '(', ')', '/', '@', ':']; |
|
13 | 13 | |
14 | 14 | public $handler; |
15 | 15 | /** |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | public function __construct(Memcached $handler) |
22 | 22 | { |
23 | 23 | $this->handler = $handler; |
24 | - if(Memcached::HAVE_IGBINARY){ |
|
24 | + if (Memcached::HAVE_IGBINARY) { |
|
25 | 25 | ini_set('memcached.serializer', 'igbinary'); |
26 | 26 | } |
27 | 27 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | /** |
30 | 30 | * {@inheritDoc} |
31 | 31 | */ |
32 | - public function get($key, $default=null) |
|
32 | + public function get($key, $default = null) |
|
33 | 33 | { |
34 | 34 | |
35 | 35 | $this->checkReservedCharacters($key); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * {@inheritDoc} |
42 | 42 | */ |
43 | - public function set($key, $value, $ttl = null){ |
|
43 | + public function set($key, $value, $ttl = null) { |
|
44 | 44 | |
45 | 45 | $this->checkReservedCharacters($key); |
46 | 46 | return $this->handler->set($key, $value, (int) $ttl); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * {@inheritDoc} |
51 | 51 | */ |
52 | - public function delete($key){ |
|
52 | + public function delete($key) { |
|
53 | 53 | |
54 | 54 | $this->checkReservedCharacters($key); |
55 | 55 | return (bool) $this->handler->delete($key); |
@@ -58,17 +58,17 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * {@inheritDoc} |
60 | 60 | */ |
61 | - public function clear(){ |
|
61 | + public function clear() { |
|
62 | 62 | return $this->handler->flush(); |
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
66 | 66 | * {@inheritDoc} |
67 | 67 | */ |
68 | - public function getMultiple($keys, $default=null) |
|
68 | + public function getMultiple($keys, $default = null) |
|
69 | 69 | { |
70 | 70 | $defaults = array_fill(0, count($keys), $default); |
71 | - foreach ($keys as $key){ |
|
71 | + foreach ($keys as $key) { |
|
72 | 72 | $this->checkReservedCharacters($key); |
73 | 73 | } |
74 | 74 | return array_merge($this->handler->getMulti($keys), $defaults); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function setMultiple($values, $ttl = null) |
81 | 81 | { |
82 | - foreach ($values as $key => $value){ |
|
82 | + foreach ($values as $key => $value) { |
|
83 | 83 | $this->checkReservedCharacters($key); |
84 | 84 | } |
85 | 85 | return $this->handler->setMulti($values, (int) $ttl); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function deleteMultiple($keys) |
92 | 92 | { |
93 | - foreach ($keys as $key){ |
|
93 | + foreach ($keys as $key) { |
|
94 | 94 | $this->checkReservedCharacters($key); |
95 | 95 | } |
96 | 96 | return $this->handler->deleteMulti($keys); |