@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | public function delete($key) |
30 | 30 | { |
31 | 31 | if (!is_string($key)) { |
32 | - throw new InvalidArgumentException('$key is not a string:' . print_r($key, true)); |
|
32 | + throw new InvalidArgumentException('$key is not a string:'.print_r($key, true)); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | return $this->removeItem($key); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function deleteMultiple($keys) |
48 | 48 | { |
49 | 49 | if (!is_array($keys) && !($keys instanceof \Traversable)) { |
50 | - throw new InvalidArgumentException('$keys is not iterable:' . print_r($keys, true)); |
|
50 | + throw new InvalidArgumentException('$keys is not iterable:'.print_r($keys, true)); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | $results = array(); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | public function getMultiple($keys, $default = null) |
95 | 95 | { |
96 | 96 | if (!is_array($keys) && !($keys instanceof \Traversable)) { |
97 | - throw new InvalidArgumentException('$keys is not iterable:' . print_r($keys, true)); |
|
97 | + throw new InvalidArgumentException('$keys is not iterable:'.print_r($keys, true)); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | $result = array(); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | public function has($key) |
123 | 123 | { |
124 | 124 | if (!is_string($key)) { |
125 | - throw new InvalidArgumentException('$key is not a string:' . print_r($key, true)); |
|
125 | + throw new InvalidArgumentException('$key is not a string:'.print_r($key, true)); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | return $this->existsItem($key); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | public function set($key, $value, $ttl = null) |
145 | 145 | { |
146 | 146 | if (!is_string($key)) { |
147 | - throw new InvalidArgumentException('$key is not a string:' . print_r($key, true)); |
|
147 | + throw new InvalidArgumentException('$key is not a string:'.print_r($key, true)); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | return $this->setItem($key, $value, $ttl); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | public function setMultiple($values, $ttl = null) |
166 | 166 | { |
167 | 167 | if (!is_array($values) && !($values instanceof \Traversable)) { |
168 | - throw new InvalidArgumentException('$values is not iterable:' . print_r($values, true)); |
|
168 | + throw new InvalidArgumentException('$values is not iterable:'.print_r($values, true)); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | $results = array(); |
@@ -251,10 +251,10 @@ discard block |
||
251 | 251 | */ |
252 | 252 | protected function getTheDefaultPrefix() |
253 | 253 | { |
254 | - return (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '') . '_' . |
|
255 | - (isset($_SERVER['THEME']) ? $_SERVER['THEME'] : '') . '_' . |
|
256 | - (isset($_SERVER['STAGE']) ? $_SERVER['STAGE'] : '') . '_' . |
|
257 | - (isset($_SESSION['language']) ? $_SESSION['language'] : '') . '_' . |
|
254 | + return (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '').'_'. |
|
255 | + (isset($_SERVER['THEME']) ? $_SERVER['THEME'] : '').'_'. |
|
256 | + (isset($_SERVER['STAGE']) ? $_SERVER['STAGE'] : '').'_'. |
|
257 | + (isset($_SESSION['language']) ? $_SESSION['language'] : '').'_'. |
|
258 | 258 | (isset($_SESSION['language_extra']) ? $_SESSION['language_extra'] : ''); |
259 | 259 | } |
260 | 260 | |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | */ |
509 | 509 | protected function calculateStoreKey($rawKey) |
510 | 510 | { |
511 | - $str = $this->getPrefix() . $rawKey; |
|
511 | + $str = $this->getPrefix().$rawKey; |
|
512 | 512 | |
513 | 513 | if ($this->adapter instanceof AdapterFile) { |
514 | 514 | $str = $this->cleanStoreKey($str); |
@@ -93,7 +93,7 @@ |
||
93 | 93 | { |
94 | 94 | // Make sure we are under the proper limit |
95 | 95 | if (strlen($key) > 250) { |
96 | - throw new InvalidArgumentException('The passed cache key is over 250 bytes:' . print_r($key, true)); |
|
96 | + throw new InvalidArgumentException('The passed cache key is over 250 bytes:'.print_r($key, true)); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | return $this->memcache->set($key, $value, $this->getCompressedFlag()); |
@@ -89,8 +89,8 @@ |
||
89 | 89 | public function set($key, $value) |
90 | 90 | { |
91 | 91 | // Make sure we are under the proper limit |
92 | - if (strlen($this->memcached->getOption(\Memcached::OPT_PREFIX_KEY) . $key) > 250) { |
|
93 | - throw new InvalidArgumentException('The passed cache key is over 250 bytes:' . print_r($key, true)); |
|
92 | + if (strlen($this->memcached->getOption(\Memcached::OPT_PREFIX_KEY).$key) > 250) { |
|
93 | + throw new InvalidArgumentException('The passed cache key is over 250 bytes:'.print_r($key, true)); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | return $this->memcached->set($key, $value); |