@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | return; |
28 | 28 | } else if (strpos($entity, 'Psr\Cache') === 0) { |
29 | 29 | trigger_error('If you cannot use <b>composer</b>, you have to include manually the Psr\\Cache interfaces.<br />See: https://github.com/php-fig/cache/tree/master/src<br /> Called ' . $entity, |
30 | - E_USER_ERROR); |
|
30 | + E_USER_ERROR); |
|
31 | 31 | |
32 | 32 | return; |
33 | 33 | } |
@@ -42,5 +42,5 @@ discard block |
||
42 | 42 | |
43 | 43 | if (class_exists('Composer\Autoload\ClassLoader')) { |
44 | 44 | trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.', |
45 | - E_USER_WARNING); |
|
45 | + E_USER_WARNING); |
|
46 | 46 | } |
47 | 47 | \ No newline at end of file |
@@ -27,7 +27,7 @@ |
||
27 | 27 | return true; |
28 | 28 | } else if (constant($CONSTANT_NAME) !== $driverName) { |
29 | 29 | trigger_error('Memcache collision detected, you used both Memcache and Memcached driver in your script, this may leads to unexpected behaviours', |
30 | - E_USER_WARNING); |
|
30 | + E_USER_WARNING); |
|
31 | 31 | |
32 | 32 | return false; |
33 | 33 | } |
@@ -160,9 +160,9 @@ discard block |
||
160 | 160 | protected static function cleanFileName($filename) |
161 | 161 | { |
162 | 162 | $regex = [ |
163 | - '/[\?\[\]\/\\\=\<\>\:\;\,\'\"\&\$\#\*\(\)\|\~\`\!\{\}]/', |
|
164 | - '/\.$/', |
|
165 | - '/^\./', |
|
163 | + '/[\?\[\]\/\\\=\<\>\:\;\,\'\"\&\$\#\*\(\)\|\~\`\!\{\}]/', |
|
164 | + '/\.$/', |
|
165 | + '/^\./', |
|
166 | 166 | ]; |
167 | 167 | $replace = ['-', '', '']; |
168 | 168 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | chmod($path, 0777); |
183 | 183 | } catch (phpFastCacheDriverException $e) { |
184 | 184 | throw new phpFastCacheDriverException('PLEASE CHMOD ' . $path . ' - 0777 OR ANY WRITABLE PERMISSION!', |
185 | - 92); |
|
185 | + 92); |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $this->driver->setItem($this); |
43 | 43 | } else { |
44 | 44 | throw new \InvalidArgumentException(sprintf('$key must be a string, got type "%s" instead.', |
45 | - gettype($key))); |
|
45 | + gettype($key))); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 |
@@ -147,10 +147,10 @@ |
||
147 | 147 | { |
148 | 148 | try{ |
149 | 149 | $server = isset($this->config[ 'ssdb' ]) ? $this->config[ 'ssdb' ] : [ |
150 | - 'host' => "127.0.0.1", |
|
151 | - 'port' => 8888, |
|
152 | - 'password' => '', |
|
153 | - 'timeout' => 2000, |
|
150 | + 'host' => "127.0.0.1", |
|
151 | + 'port' => 8888, |
|
152 | + 'password' => '', |
|
153 | + 'timeout' => 2000, |
|
154 | 154 | ]; |
155 | 155 | |
156 | 156 | $host = $server[ 'host' ]; |
@@ -214,9 +214,9 @@ |
||
214 | 214 | public function driverPreWrap(ExtendedCacheItemInterface $item) |
215 | 215 | { |
216 | 216 | return [ |
217 | - self::DRIVER_DATA_WRAPPER_INDEX => $item->get(), |
|
218 | - self::DRIVER_TIME_WRAPPER_INDEX => $item->getExpirationDate(), |
|
219 | - self::DRIVER_TAGS_WRAPPER_INDEX => $item->getTags(), |
|
217 | + self::DRIVER_DATA_WRAPPER_INDEX => $item->get(), |
|
218 | + self::DRIVER_TIME_WRAPPER_INDEX => $item->getExpirationDate(), |
|
219 | + self::DRIVER_TAGS_WRAPPER_INDEX => $item->getTags(), |
|
220 | 220 | ]; |
221 | 221 | } |
222 | 222 |
@@ -175,9 +175,9 @@ |
||
175 | 175 | $info = $this->instance->info(); |
176 | 176 | $date = (new \DateTime())->setTimestamp(time() - $info['uptime_in_seconds']); |
177 | 177 | return (new driverStatistic()) |
178 | - ->setData(implode(', ', array_keys($this->itemInstances))) |
|
179 | - ->setRawData($info) |
|
180 | - ->setSize($info['used_memory']) |
|
181 | - ->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.", $info['redis_version'], $date->format(DATE_RFC2822))); |
|
178 | + ->setData(implode(', ', array_keys($this->itemInstances))) |
|
179 | + ->setRawData($info) |
|
180 | + ->setSize($info['used_memory']) |
|
181 | + ->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.", $info['redis_version'], $date->format(DATE_RFC2822))); |
|
182 | 182 | } |
183 | 183 | } |
184 | 184 | \ No newline at end of file |
@@ -127,14 +127,14 @@ discard block |
||
127 | 127 | public function driverConnect() |
128 | 128 | { |
129 | 129 | $server = isset($this->config[ 'redis' ]) ? $this->config[ 'redis' ] : [ |
130 | - 'host' => '127.0.0.1', |
|
131 | - 'port' => '6379', |
|
132 | - 'password' => '', |
|
133 | - 'database' => '', |
|
130 | + 'host' => '127.0.0.1', |
|
131 | + 'port' => '6379', |
|
132 | + 'password' => '', |
|
133 | + 'database' => '', |
|
134 | 134 | ]; |
135 | 135 | |
136 | 136 | $config = [ |
137 | - 'host' => $server[ 'host' ], |
|
137 | + 'host' => $server[ 'host' ], |
|
138 | 138 | ]; |
139 | 139 | |
140 | 140 | $port = isset($server[ 'port' ]) ? $server[ 'port' ] : ''; |
@@ -196,8 +196,8 @@ discard block |
||
196 | 196 | public function getStats() |
197 | 197 | { |
198 | 198 | return (new driverStatistic()) |
199 | - ->setRawData($this->instance->info()) |
|
200 | - ->setSize(0) |
|
201 | - ->setInfo(''); |
|
199 | + ->setRawData($this->instance->info()) |
|
200 | + ->setSize(0) |
|
201 | + ->setInfo(''); |
|
202 | 202 | } |
203 | 203 | } |
204 | 204 | \ No newline at end of file |
@@ -176,9 +176,9 @@ |
||
176 | 176 | public function getStats() |
177 | 177 | { |
178 | 178 | return (new driverStatistic()) |
179 | - ->setData(implode(', ', array_keys($this->itemInstances))) |
|
180 | - ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($this->getLeveldbFile())) |
|
181 | - ->setSize(Directory::dirSize($this->getLeveldbFile())); |
|
179 | + ->setData(implode(', ', array_keys($this->itemInstances))) |
|
180 | + ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($this->getLeveldbFile())) |
|
181 | + ->setSize(Directory::dirSize($this->getLeveldbFile())); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |