@@ -140,9 +140,9 @@ |
||
140 | 140 | { |
141 | 141 | $stat = new DriverStatistic(); |
142 | 142 | $stat->setInfo('[Memstatic] A memory static driver') |
143 | - ->setSize(mb_strlen(serialize($this->staticStack))) |
|
144 | - ->setData(implode(', ', array_keys($this->itemInstances))) |
|
145 | - ->setRawData($this->staticStack); |
|
143 | + ->setSize(mb_strlen(serialize($this->staticStack))) |
|
144 | + ->setData(implode(', ', array_keys($this->itemInstances))) |
|
145 | + ->setRawData($this->staticStack); |
|
146 | 146 | |
147 | 147 | return $stat; |
148 | 148 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * Check for Cross-Driver type confusion |
69 | 69 | */ |
70 | 70 | if ($item instanceof Item) { |
71 | - return $this->staticStack[ md5($item->getKey()) ] = $this->driverPreWrap($item); |
|
71 | + return $this->staticStack[md5($item->getKey())] = $this->driverPreWrap($item); |
|
72 | 72 | } else { |
73 | 73 | throw new phpFastCacheInvalidArgumentException('Cross-Driver type confusion detected'); |
74 | 74 | } |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | protected function driverRead(CacheItemInterface $item) |
82 | 82 | { |
83 | 83 | $key = md5($item->getKey()); |
84 | - if (isset($this->staticStack[ $key ])) { |
|
85 | - return $this->staticStack[ $key ]; |
|
84 | + if (isset($this->staticStack[$key])) { |
|
85 | + return $this->staticStack[$key]; |
|
86 | 86 | } |
87 | 87 | return null; |
88 | 88 | } |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | */ |
100 | 100 | if ($item instanceof Item) { |
101 | 101 | $key = md5($item->getKey()); |
102 | - if (isset($this->staticStack[ $key ])) { |
|
103 | - unset($this->staticStack[ $key ]); |
|
102 | + if (isset($this->staticStack[$key])) { |
|
103 | + unset($this->staticStack[$key]); |
|
104 | 104 | return true; |
105 | 105 | } |
106 | 106 | return false; |
@@ -163,10 +163,10 @@ |
||
163 | 163 | $date = (new \DateTime())->setTimestamp(time() - $info[ 'uptime_in_seconds' ]); |
164 | 164 | |
165 | 165 | return (new DriverStatistic()) |
166 | - ->setData(implode(', ', array_keys($this->itemInstances))) |
|
167 | - ->setRawData($info) |
|
168 | - ->setSize($info[ 'used_memory' ]) |
|
169 | - ->setInfo(sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", |
|
166 | + ->setData(implode(', ', array_keys($this->itemInstances))) |
|
167 | + ->setRawData($info) |
|
168 | + ->setSize($info[ 'used_memory' ]) |
|
169 | + ->setInfo(sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", |
|
170 | 170 | $info[ 'redis_version' ], $date->format(DATE_RFC2822))); |
171 | 171 | } |
172 | 172 | } |
173 | 173 | \ No newline at end of file |
@@ -126,20 +126,20 @@ discard block |
||
126 | 126 | } else { |
127 | 127 | $this->instance = $this->instance ?: new RedisClient(); |
128 | 128 | |
129 | - $host = isset($this->config[ 'host' ]) ? $this->config[ 'host' ] : '127.0.0.1'; |
|
130 | - $port = isset($this->config[ 'port' ]) ? (int)$this->config[ 'port' ] : '6379'; |
|
131 | - $password = isset($this->config[ 'password' ]) ? $this->config[ 'password' ] : ''; |
|
132 | - $database = isset($this->config[ 'database' ]) ? $this->config[ 'database' ] : ''; |
|
133 | - $timeout = isset($this->config[ 'timeout' ]) ? $this->config[ 'timeout' ] : ''; |
|
129 | + $host = isset($this->config['host']) ? $this->config['host'] : '127.0.0.1'; |
|
130 | + $port = isset($this->config['port']) ? (int) $this->config['port'] : '6379'; |
|
131 | + $password = isset($this->config['password']) ? $this->config['password'] : ''; |
|
132 | + $database = isset($this->config['database']) ? $this->config['database'] : ''; |
|
133 | + $timeout = isset($this->config['timeout']) ? $this->config['timeout'] : ''; |
|
134 | 134 | |
135 | - if (!$this->instance->connect($host, (int)$port, (int)$timeout)) { |
|
135 | + if (!$this->instance->connect($host, (int) $port, (int) $timeout)) { |
|
136 | 136 | return false; |
137 | 137 | } else { |
138 | 138 | if ($password && !$this->instance->auth($password)) { |
139 | 139 | return false; |
140 | 140 | } |
141 | 141 | if ($database) { |
142 | - $this->instance->select((int)$database); |
|
142 | + $this->instance->select((int) $database); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | return true; |
@@ -160,13 +160,13 @@ discard block |
||
160 | 160 | { |
161 | 161 | // used_memory |
162 | 162 | $info = $this->instance->info(); |
163 | - $date = (new \DateTime())->setTimestamp(time() - $info[ 'uptime_in_seconds' ]); |
|
163 | + $date = (new \DateTime())->setTimestamp(time() - $info['uptime_in_seconds']); |
|
164 | 164 | |
165 | 165 | return (new DriverStatistic()) |
166 | 166 | ->setData(implode(', ', array_keys($this->itemInstances))) |
167 | 167 | ->setRawData($info) |
168 | - ->setSize($info[ 'used_memory' ]) |
|
168 | + ->setSize($info['used_memory']) |
|
169 | 169 | ->setInfo(sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.", |
170 | - $info[ 'redis_version' ], $date->format(DATE_RFC2822))); |
|
170 | + $info['redis_version'], $date->format(DATE_RFC2822))); |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | \ No newline at end of file |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | protected function driverConnect() |
130 | 130 | { |
131 | 131 | $this->instance = new MemcachedSoftware(); |
132 | - $servers = (!empty($this->config[ 'servers' ]) && is_array($this->config[ 'servers' ]) ? $this->config[ 'servers' ] : []); |
|
132 | + $servers = (!empty($this->config['servers']) && is_array($this->config['servers']) ? $this->config['servers'] : []); |
|
133 | 133 | if (count($servers) < 1) { |
134 | 134 | $servers = [ |
135 | 135 | [ |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | |
144 | 144 | foreach ($servers as $server) { |
145 | 145 | try { |
146 | - if (!$this->instance->addServer($server[ 'host' ], $server[ 'port' ])) { |
|
146 | + if (!$this->instance->addServer($server['host'], $server['port'])) { |
|
147 | 147 | $this->fallback = true; |
148 | 148 | } |
149 | - if (!empty($server[ 'sasl_user' ]) && !empty($server[ 'sasl_password' ])) { |
|
150 | - $this->instance->setSaslAuthData($server[ 'sasl_user' ], $server[ 'sasl_password' ]); |
|
149 | + if (!empty($server['sasl_user']) && !empty($server['sasl_password'])) { |
|
150 | + $this->instance->setSaslAuthData($server['sasl_user'], $server['sasl_password']); |
|
151 | 151 | } |
152 | 152 | } catch (\Exception $e) { |
153 | 153 | $this->fallback = true; |
@@ -166,17 +166,17 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function getStats() |
168 | 168 | { |
169 | - $stats = (array)$this->instance->getStats(); |
|
170 | - $stats[ 'uptime' ] = (isset($stats[ 'uptime' ]) ? $stats[ 'uptime' ] : 0); |
|
171 | - $stats[ 'version' ] = (isset($stats[ 'version' ]) ? $stats[ 'version' ] : 'UnknownVersion'); |
|
172 | - $stats[ 'bytes' ] = (isset($stats[ 'bytes' ]) ? $stats[ 'version' ] : 0); |
|
169 | + $stats = (array) $this->instance->getStats(); |
|
170 | + $stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0); |
|
171 | + $stats['version'] = (isset($stats['version']) ? $stats['version'] : 'UnknownVersion'); |
|
172 | + $stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0); |
|
173 | 173 | |
174 | - $date = (new \DateTime())->setTimestamp(time() - $stats[ 'uptime' ]); |
|
174 | + $date = (new \DateTime())->setTimestamp(time() - $stats['uptime']); |
|
175 | 175 | |
176 | 176 | return (new DriverStatistic()) |
177 | 177 | ->setData(implode(', ', array_keys($this->itemInstances))) |
178 | - ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822))) |
|
178 | + ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822))) |
|
179 | 179 | ->setRawData($stats) |
180 | - ->setSize($stats[ 'bytes' ]); |
|
180 | + ->setSize($stats['bytes']); |
|
181 | 181 | } |
182 | 182 | } |
183 | 183 | \ No newline at end of file |
@@ -133,12 +133,12 @@ discard block |
||
133 | 133 | $servers = (!empty($this->config[ 'servers' ]) && is_array($this->config[ 'servers' ]) ? $this->config[ 'servers' ] : []); |
134 | 134 | if (count($servers) < 1) { |
135 | 135 | $servers = [ |
136 | - [ |
|
136 | + [ |
|
137 | 137 | 'host' => '127.0.0.1', |
138 | 138 | 'port' => 11211, |
139 | 139 | 'sasl_user' => false, |
140 | 140 | 'sasl_password' => false, |
141 | - ], |
|
141 | + ], |
|
142 | 142 | ]; |
143 | 143 | } |
144 | 144 | |
@@ -175,9 +175,9 @@ discard block |
||
175 | 175 | $date = (new \DateTime())->setTimestamp(time() - $stats[ 'uptime' ]); |
176 | 176 | |
177 | 177 | return (new DriverStatistic()) |
178 | - ->setData(implode(', ', array_keys($this->itemInstances))) |
|
179 | - ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822))) |
|
180 | - ->setRawData($stats) |
|
181 | - ->setSize($stats[ 'bytes' ]); |
|
178 | + ->setData(implode(', ', array_keys($this->itemInstances))) |
|
179 | + ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats[ 'version' ], $date->format(DATE_RFC2822))) |
|
180 | + ->setRawData($stats) |
|
181 | + ->setSize($stats[ 'bytes' ]); |
|
182 | 182 | } |
183 | 183 | } |
184 | 184 | \ No newline at end of file |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | * due to performance issue on huge |
76 | 76 | * loop dispatching operations |
77 | 77 | */ |
78 | - if (isset($this->events[ $eventName ])) { |
|
79 | - foreach ($this->events[ $eventName ] as $event) { |
|
78 | + if (isset($this->events[$eventName])) { |
|
79 | + foreach ($this->events[$eventName] as $event) { |
|
80 | 80 | call_user_func_array($event, $args); |
81 | 81 | } |
82 | 82 | } |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | { |
93 | 93 | if (strpos($name, 'on') === 0) { |
94 | 94 | $name = substr($name, 2); |
95 | - if (is_callable($arguments[ 0 ])) { |
|
96 | - if (isset($arguments[ 1 ]) && is_string($arguments[ 0 ])) { |
|
97 | - $this->events[ $name ][ $arguments[ 1 ] ] = $arguments[ 0 ]; |
|
95 | + if (is_callable($arguments[0])) { |
|
96 | + if (isset($arguments[1]) && is_string($arguments[0])) { |
|
97 | + $this->events[$name][$arguments[1]] = $arguments[0]; |
|
98 | 98 | } else { |
99 | - $this->events[ $name ][] = $arguments[ 0 ]; |
|
99 | + $this->events[$name][] = $arguments[0]; |
|
100 | 100 | } |
101 | 101 | } else { |
102 | - throw new phpFastCacheInvalidArgumentException(sprintf('Expected Callable, got "%s"', gettype($arguments[ 0 ]))); |
|
102 | + throw new phpFastCacheInvalidArgumentException(sprintf('Expected Callable, got "%s"', gettype($arguments[0]))); |
|
103 | 103 | } |
104 | 104 | } else { |
105 | 105 | throw new \BadMethodCallException('An event must start with "on" such as "onCacheGetItem"'); |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function unbindEventCallback($eventName, $callbackName) |
115 | 115 | { |
116 | - if (isset($this->events[ $eventName ][ $callbackName ])) { |
|
117 | - unset($this->events[ $eventName ][ $callbackName ]); |
|
116 | + if (isset($this->events[$eventName][$callbackName])) { |
|
117 | + unset($this->events[$eventName][$callbackName]); |
|
118 | 118 | return true; |
119 | 119 | } |
120 | 120 | return false; |
@@ -139,9 +139,9 @@ |
||
139 | 139 | public function driverPreWrap(ExtendedCacheItemInterface $item) |
140 | 140 | { |
141 | 141 | $wrap = [ |
142 | - self::DRIVER_DATA_WRAPPER_INDEX => $item->get(), |
|
143 | - self::DRIVER_TAGS_WRAPPER_INDEX => $item->getTags(), |
|
144 | - self::DRIVER_EDATE_WRAPPER_INDEX => $item->getExpirationDate(), |
|
142 | + self::DRIVER_DATA_WRAPPER_INDEX => $item->get(), |
|
143 | + self::DRIVER_TAGS_WRAPPER_INDEX => $item->getTags(), |
|
144 | + self::DRIVER_EDATE_WRAPPER_INDEX => $item->getExpirationDate(), |
|
145 | 145 | ]; |
146 | 146 | |
147 | 147 | if ($this->config[ 'itemDetailedDate' ]) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if (is_array($config_name)) { |
55 | 55 | $this->config = array_merge($this->config, $config_name); |
56 | 56 | } else { |
57 | - $this->config[ $config_name ] = $value; |
|
57 | + $this->config[$config_name] = $value; |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function getConfigOption($optionName) |
74 | 74 | { |
75 | - if (isset($this->config[ $optionName ])) { |
|
76 | - return $this->config[ $optionName ]; |
|
75 | + if (isset($this->config[$optionName])) { |
|
76 | + return $this->config[$optionName]; |
|
77 | 77 | } else { |
78 | 78 | return null; |
79 | 79 | } |
@@ -144,16 +144,16 @@ discard block |
||
144 | 144 | self::DRIVER_EDATE_WRAPPER_INDEX => $item->getExpirationDate(), |
145 | 145 | ]; |
146 | 146 | |
147 | - if ($this->config[ 'itemDetailedDate' ]) { |
|
148 | - $wrap[ self::DRIVER_MDATE_WRAPPER_INDEX ] = new \DateTime(); |
|
147 | + if ($this->config['itemDetailedDate']) { |
|
148 | + $wrap[self::DRIVER_MDATE_WRAPPER_INDEX] = new \DateTime(); |
|
149 | 149 | /** |
150 | 150 | * If the creation date exists |
151 | 151 | * reuse it else set a new Date |
152 | 152 | */ |
153 | - $wrap[ self::DRIVER_CDATE_WRAPPER_INDEX ] = $item->getCreationDate() ?: new \DateTime(); |
|
153 | + $wrap[self::DRIVER_CDATE_WRAPPER_INDEX] = $item->getCreationDate() ?: new \DateTime(); |
|
154 | 154 | } else { |
155 | - $wrap[ self::DRIVER_MDATE_WRAPPER_INDEX ] = null; |
|
156 | - $wrap[ self::DRIVER_CDATE_WRAPPER_INDEX ] = null; |
|
155 | + $wrap[self::DRIVER_MDATE_WRAPPER_INDEX] = null; |
|
156 | + $wrap[self::DRIVER_CDATE_WRAPPER_INDEX] = null; |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | return $wrap; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | public function driverUnwrapData(array $wrapper) |
167 | 167 | { |
168 | - return $wrapper[ self::DRIVER_DATA_WRAPPER_INDEX ]; |
|
168 | + return $wrapper[self::DRIVER_DATA_WRAPPER_INDEX]; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | */ |
175 | 175 | public function driverUnwrapTags(array $wrapper) |
176 | 176 | { |
177 | - return $wrapper[ self::DRIVER_TAGS_WRAPPER_INDEX ]; |
|
177 | + return $wrapper[self::DRIVER_TAGS_WRAPPER_INDEX]; |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function driverUnwrapEdate(array $wrapper) |
186 | 186 | { |
187 | - return $wrapper[ self::DRIVER_EDATE_WRAPPER_INDEX ]; |
|
187 | + return $wrapper[self::DRIVER_EDATE_WRAPPER_INDEX]; |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | /** |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | */ |
194 | 194 | public function driverUnwrapCdate(array $wrapper) |
195 | 195 | { |
196 | - return $wrapper[ self::DRIVER_CDATE_WRAPPER_INDEX ]; |
|
196 | + return $wrapper[self::DRIVER_CDATE_WRAPPER_INDEX]; |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | */ |
204 | 204 | public function driverUnwrapMdate(array $wrapper) |
205 | 205 | { |
206 | - return $wrapper[ self::DRIVER_MDATE_WRAPPER_INDEX ]; |
|
206 | + return $wrapper[self::DRIVER_MDATE_WRAPPER_INDEX]; |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | /** |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | * that has slow performances |
248 | 248 | */ |
249 | 249 | |
250 | - $tagsItem->set(array_merge((array)$data, [$item->getKey() => $expTimestamp])); |
|
250 | + $tagsItem->set(array_merge((array) $data, [$item->getKey() => $expTimestamp])); |
|
251 | 251 | |
252 | 252 | /** |
253 | 253 | * Set the expiration date |
@@ -269,9 +269,9 @@ discard block |
||
269 | 269 | $tagsItems = $this->getItems($this->getTagKeys($item->getRemovedTags())); |
270 | 270 | |
271 | 271 | foreach ($tagsItems as $tagsItem) { |
272 | - $data = (array)$tagsItem->get(); |
|
272 | + $data = (array) $tagsItem->get(); |
|
273 | 273 | |
274 | - unset($data[ $item->getKey() ]); |
|
274 | + unset($data[$item->getKey()]); |
|
275 | 275 | $tagsItem->set($data); |
276 | 276 | |
277 | 277 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public function getCreationDate() |
113 | 113 | { |
114 | - if ($this->driver->getConfig()[ 'itemDetailedDate' ]) { |
|
114 | + if ($this->driver->getConfig()['itemDetailedDate']) { |
|
115 | 115 | return $this->creationDate; |
116 | 116 | } else { |
117 | 117 | throw new phpFastCacheLogicException('Cannot access to the creation date when the "itemDetailedDate" configuration is disabled.'); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | public function setCreationDate(\DateTimeInterface $date) |
127 | 127 | { |
128 | - if ($this->driver->getConfig()[ 'itemDetailedDate' ]) { |
|
128 | + if ($this->driver->getConfig()['itemDetailedDate']) { |
|
129 | 129 | $this->creationDate = $date; |
130 | 130 | return $this; |
131 | 131 | } else { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | public function getModificationDate() |
141 | 141 | { |
142 | - if ($this->driver->getConfig()[ 'itemDetailedDate' ]) { |
|
142 | + if ($this->driver->getConfig()['itemDetailedDate']) { |
|
143 | 143 | return $this->modificationDate; |
144 | 144 | } else { |
145 | 145 | throw new phpFastCacheLogicException('Cannot access to the modification date when the "itemDetailedDate" configuration is disabled.'); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function setModificationDate(\DateTimeInterface $date) |
155 | 155 | { |
156 | - if ($this->driver->getConfig()[ 'itemDetailedDate' ]) { |
|
156 | + if ($this->driver->getConfig()['itemDetailedDate']) { |
|
157 | 157 | $this->modificationDate = $date; |
158 | 158 | return $this; |
159 | 159 | } else { |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | if (is_array($this->data)) { |
227 | 227 | $this->data[] = $data; |
228 | 228 | } else if (is_string($data)) { |
229 | - $this->data .= (string)$data; |
|
229 | + $this->data .= (string) $data; |
|
230 | 230 | } else { |
231 | 231 | throw new phpFastCacheInvalidArgumentException('$data must be either array nor string.'); |
232 | 232 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | if (is_array($this->data)) { |
246 | 246 | array_unshift($this->data, $data); |
247 | 247 | } else if (is_string($data)) { |
248 | - $this->data = (string)$data . $this->data; |
|
248 | + $this->data = (string) $data . $this->data; |
|
249 | 249 | } else { |
250 | 250 | throw new phpFastCacheInvalidArgumentException('$data must be either array nor string.'); |
251 | 251 | } |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | public function removeTag($tagName) |
325 | 325 | { |
326 | 326 | if (($key = array_search($tagName, $this->tags)) !== false) { |
327 | - unset($this->tags[ $key ]); |
|
327 | + unset($this->tags[$key]); |
|
328 | 328 | $this->removedTags[] = $tagName; |
329 | 329 | } |
330 | 330 | |
@@ -403,8 +403,8 @@ discard block |
||
403 | 403 | final public function __debugInfo() |
404 | 404 | { |
405 | 405 | $info = get_object_vars($this); |
406 | - $info[ 'driver' ] = 'object(' . get_class($info[ 'driver' ]) . ')'; |
|
406 | + $info['driver'] = 'object(' . get_class($info['driver']) . ')'; |
|
407 | 407 | |
408 | - return (array)$info; |
|
408 | + return (array) $info; |
|
409 | 409 | } |
410 | 410 | } |
411 | 411 | \ No newline at end of file |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function __construct() |
38 | 38 | { |
39 | - $this->instances =& CacheManager::getInternalInstances(); |
|
39 | + $this->instances = & CacheManager::getInternalInstances(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | protected function getGenericCallback() |
46 | 46 | { |
47 | - return function ($method, $args) { |
|
47 | + return function($method, $args) { |
|
48 | 48 | $getterMethod = (strpos($method, 'get') === 0); |
49 | 49 | $return = false; |
50 | 50 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | foreach ($this->instances as $instance) { |
56 | 56 | $reflectionMethod = new \ReflectionMethod(get_class($instance), $method); |
57 | 57 | if ($getterMethod) { |
58 | - $return[ $instance->getDriverName() ] = $reflectionMethod->invokeArgs($instance, $args); |
|
58 | + $return[$instance->getDriverName()] = $reflectionMethod->invokeArgs($instance, $args); |
|
59 | 59 | } else { |
60 | 60 | $result = $reflectionMethod->invokeArgs($instance, $args); |
61 | 61 | if ($result !== false) { |