@@ -96,15 +96,15 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | public function deleteItem($key) { |
| 98 | 98 | |
| 99 | - if (iterator_count($this->stack) == 0) return $this->vacuum->deleteItem($key); |
|
| 99 | + if ( iterator_count($this->stack) == 0 ) return $this->vacuum->deleteItem($key); |
|
| 100 | 100 | |
| 101 | - if ( $this->align_cache === false && $this->pick_mode < 5) { |
|
| 101 | + if ( $this->align_cache === false && $this->pick_mode < 5 ) { |
|
| 102 | 102 | return $this->selectProvider()->deleteItem($key); |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | $result = []; |
| 106 | 106 | |
| 107 | - foreach ($this->stack as $provider) { |
|
| 107 | + foreach ( $this->stack as $provider ) { |
|
| 108 | 108 | |
| 109 | 109 | $result[] = $provider[0]->deleteItem($key); |
| 110 | 110 | |
@@ -116,15 +116,15 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | public function save(CacheItemInterface $item) { |
| 118 | 118 | |
| 119 | - if (iterator_count($this->stack) == 0) return $this->vacuum->save($item); |
|
| 119 | + if ( iterator_count($this->stack) == 0 ) return $this->vacuum->save($item); |
|
| 120 | 120 | |
| 121 | - if ( $this->align_cache === false && $this->pick_mode < 5) { |
|
| 121 | + if ( $this->align_cache === false && $this->pick_mode < 5 ) { |
|
| 122 | 122 | return $this->selectProvider()->save($item); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | $result = []; |
| 126 | 126 | |
| 127 | - foreach ($this->stack as $provider) { |
|
| 127 | + foreach ( $this->stack as $provider ) { |
|
| 128 | 128 | |
| 129 | 129 | $pro = $provider[0]; |
| 130 | 130 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | $manager = new Manager(...$manager_configuration); |
| 149 | 149 | |
| 150 | - foreach ($providers as $name => $provider) { |
|
| 150 | + foreach ( $providers as $name => $provider ) { |
|
| 151 | 151 | $instance = $provider->instance; |
| 152 | 152 | $weight = $provider->weight; |
| 153 | 153 | $id = $instance->getId(); |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | if ( $mode == 'GET' ) { |
| 197 | 197 | |
| 198 | - foreach ($this->stack as $provider) { |
|
| 198 | + foreach ( $this->stack as $provider ) { |
|
| 199 | 199 | |
| 200 | 200 | $result[] = $provider[0]->getItem($key); |
| 201 | 201 | |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | |
| 211 | 211 | } else { |
| 212 | 212 | |
| 213 | - foreach ($this->stack as $provider) { |
|
| 213 | + foreach ( $this->stack as $provider ) { |
|
| 214 | 214 | |
| 215 | 215 | $result[] = $provider[0]->hasItem($key); |
| 216 | 216 | |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | |
| 232 | 232 | if ( $mode == 'GET' ) { |
| 233 | 233 | |
| 234 | - foreach ($this->stack as $provider) { |
|
| 234 | + foreach ( $this->stack as $provider ) { |
|
| 235 | 235 | |
| 236 | 236 | $item = $provider[0]->getItem($key); |
| 237 | 237 | |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | |
| 254 | 254 | } else { |
| 255 | 255 | |
| 256 | - foreach ($this->stack as $provider) { |
|
| 256 | + foreach ( $this->stack as $provider ) { |
|
| 257 | 257 | |
| 258 | 258 | $item = $provider[0]->hasItem($key); |
| 259 | 259 | |
@@ -86,15 +86,15 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | public function set($key, $value, $ttl = null) { |
| 88 | 88 | |
| 89 | - if (iterator_count($this->stack) == 0) return $this->vacuum->set($key, $value, $ttl); |
|
| 89 | + if ( iterator_count($this->stack) == 0 ) return $this->vacuum->set($key, $value, $ttl); |
|
| 90 | 90 | |
| 91 | - if ( $this->align_cache === false && $this->pick_mode < 5) { |
|
| 91 | + if ( $this->align_cache === false && $this->pick_mode < 5 ) { |
|
| 92 | 92 | return $this->selectProvider()->set($key, $value, $ttl); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $result = []; |
| 96 | 96 | |
| 97 | - foreach ($this->stack as $provider) { |
|
| 97 | + foreach ( $this->stack as $provider ) { |
|
| 98 | 98 | |
| 99 | 99 | $pro = $provider[0]; |
| 100 | 100 | |
@@ -113,15 +113,15 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | public function delete($key) { |
| 115 | 115 | |
| 116 | - if (iterator_count($this->stack) == 0) return $this->vacuum->delete($key); |
|
| 116 | + if ( iterator_count($this->stack) == 0 ) return $this->vacuum->delete($key); |
|
| 117 | 117 | |
| 118 | - if ( $this->align_cache === false && $this->pick_mode < 5) { |
|
| 118 | + if ( $this->align_cache === false && $this->pick_mode < 5 ) { |
|
| 119 | 119 | return $this->selectProvider()->delete($key); |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | $result = []; |
| 123 | 123 | |
| 124 | - foreach ($this->stack as $provider) { |
|
| 124 | + foreach ( $this->stack as $provider ) { |
|
| 125 | 125 | |
| 126 | 126 | $result[] = $provider[0]->delete($key); |
| 127 | 127 | |
@@ -139,15 +139,15 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | public function setMultiple($values, $ttl = null) { |
| 141 | 141 | |
| 142 | - if (iterator_count($this->stack) == 0) return $this->vacuum->setMultiple($values, $ttl); |
|
| 142 | + if ( iterator_count($this->stack) == 0 ) return $this->vacuum->setMultiple($values, $ttl); |
|
| 143 | 143 | |
| 144 | - if ( $this->align_cache === false && $this->pick_mode < 5) { |
|
| 144 | + if ( $this->align_cache === false && $this->pick_mode < 5 ) { |
|
| 145 | 145 | return $this->selectProvider()->setMultiple($values, $ttl); |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | $result = []; |
| 149 | 149 | |
| 150 | - foreach ($this->stack as $provider) { |
|
| 150 | + foreach ( $this->stack as $provider ) { |
|
| 151 | 151 | |
| 152 | 152 | $result[] = $provider[0]->setMultiple($values, $ttl); |
| 153 | 153 | |
@@ -159,15 +159,15 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | public function deleteMultiple($keys) { |
| 161 | 161 | |
| 162 | - if (iterator_count($this->stack) == 0) return $this->vacuum->deleteMultiple($keys); |
|
| 162 | + if ( iterator_count($this->stack) == 0 ) return $this->vacuum->deleteMultiple($keys); |
|
| 163 | 163 | |
| 164 | - if ( $this->align_cache === false && $this->pick_mode < 5) { |
|
| 164 | + if ( $this->align_cache === false && $this->pick_mode < 5 ) { |
|
| 165 | 165 | return $this->selectProvider()->deleteMultiple($keys); |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | $result = []; |
| 169 | 169 | |
| 170 | - foreach ($this->stack as $provider) { |
|
| 170 | + foreach ( $this->stack as $provider ) { |
|
| 171 | 171 | |
| 172 | 172 | $result[] = $provider[0]->deleteMultiple($keys); |
| 173 | 173 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | $manager = new Manager(...$manager_configuration); |
| 191 | 191 | |
| 192 | - foreach ($providers as $name => $provider) { |
|
| 192 | + foreach ( $providers as $name => $provider ) { |
|
| 193 | 193 | $instance = $provider->instance; |
| 194 | 194 | $weight = $provider->weight; |
| 195 | 195 | $id = $instance->getId(); |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | - protected function selectFrom($mode, $key, $default=null) { |
|
| 204 | + protected function selectFrom($mode, $key, $default = null) { |
|
| 205 | 205 | |
| 206 | 206 | if ( $this->pick_mode < 5 ) { |
| 207 | 207 | |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | $provider = $this->selectProvider(); |
| 227 | 227 | |
| 228 | - switch ($mode) { |
|
| 228 | + switch ( $mode ) { |
|
| 229 | 229 | |
| 230 | 230 | case 'GET': |
| 231 | 231 | $data = $provider->get($key, $default); |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | |
| 252 | 252 | if ( $mode == 'GET' ) { |
| 253 | 253 | |
| 254 | - foreach ($this->stack as $provider) { |
|
| 254 | + foreach ( $this->stack as $provider ) { |
|
| 255 | 255 | |
| 256 | 256 | $result[] = $provider[0]->get($key, $default); |
| 257 | 257 | |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | |
| 267 | 267 | } else if ( $mode == 'GETMULTIPLE' ) { |
| 268 | 268 | |
| 269 | - foreach ($this->stack as $provider) { |
|
| 269 | + foreach ( $this->stack as $provider ) { |
|
| 270 | 270 | |
| 271 | 271 | $result[] = $provider[0]->getMultiple($key, $default); |
| 272 | 272 | |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | |
| 286 | 286 | } else { |
| 287 | 287 | |
| 288 | - foreach ($this->stack as $provider) { |
|
| 288 | + foreach ( $this->stack as $provider ) { |
|
| 289 | 289 | |
| 290 | 290 | $result[] = $provider[0]->has($key); |
| 291 | 291 | |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | if ( $mode == 'GET' ) { |
| 308 | 308 | |
| 309 | - foreach ($this->stack as $provider) { |
|
| 309 | + foreach ( $this->stack as $provider ) { |
|
| 310 | 310 | |
| 311 | 311 | $item = $provider[0]->get($key); |
| 312 | 312 | |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | |
| 329 | 329 | } else if ( $mode == 'GETMULTIPLE' ) { |
| 330 | 330 | |
| 331 | - foreach ($this->stack as $provider) { |
|
| 331 | + foreach ( $this->stack as $provider ) { |
|
| 332 | 332 | |
| 333 | 333 | $items = $provider[0]->getMultiple($key); |
| 334 | 334 | |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | |
| 353 | 353 | } else { |
| 354 | 354 | |
| 355 | - foreach ($this->stack as $provider) { |
|
| 355 | + foreach ( $this->stack as $provider ) { |
|
| 356 | 356 | |
| 357 | 357 | $item = $provider[0]->has($key); |
| 358 | 358 | |