@@ -11,7 +11,7 @@ |
||
11 | 11 | * @author Georges.L (Geolim4) <[email protected]> |
12 | 12 | * |
13 | 13 | */ |
14 | -declare(strict_types=1); |
|
14 | +declare(strict_types = 1); |
|
15 | 15 | |
16 | 16 | namespace Phpfastcache\Exceptions; |
17 | 17 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * @author Georges.L (Geolim4) <[email protected]> |
12 | 12 | * |
13 | 13 | */ |
14 | -declare(strict_types=1); |
|
14 | +declare(strict_types = 1); |
|
15 | 15 | |
16 | 16 | namespace Phpfastcache\Exceptions; |
17 | 17 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * @author Georges.L (Geolim4) <[email protected]> |
12 | 12 | * |
13 | 13 | */ |
14 | -declare(strict_types=1); |
|
14 | +declare(strict_types = 1); |
|
15 | 15 | |
16 | 16 | namespace Phpfastcache\Exceptions; |
17 | 17 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * @author Georges.L (Geolim4) <[email protected]> |
12 | 12 | * |
13 | 13 | */ |
14 | -declare(strict_types=1); |
|
14 | +declare(strict_types = 1); |
|
15 | 15 | |
16 | 16 | namespace Phpfastcache\Exceptions; |
17 | 17 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * @author Georges.L (Geolim4) <[email protected]> |
12 | 12 | * |
13 | 13 | */ |
14 | -declare(strict_types=1); |
|
14 | +declare(strict_types = 1); |
|
15 | 15 | |
16 | 16 | namespace Phpfastcache\Exceptions; |
17 | 17 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * @author Georges.L (Geolim4) <[email protected]> |
12 | 12 | * |
13 | 13 | */ |
14 | -declare(strict_types=1); |
|
14 | +declare(strict_types = 1); |
|
15 | 15 | |
16 | 16 | namespace Phpfastcache\Exceptions; |
17 | 17 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * @author Georges.L (Geolim4) <[email protected]> |
12 | 12 | * |
13 | 13 | */ |
14 | -declare(strict_types=1); |
|
14 | +declare(strict_types = 1); |
|
15 | 15 | |
16 | 16 | namespace Phpfastcache\Helper; |
17 | 17 |
@@ -221,11 +221,11 @@ discard block |
||
221 | 221 | $this->printSkipText('A driver could not be initialized due to missing requirement: ' . $exception->getMessage()); |
222 | 222 | } else { |
223 | 223 | $this->printFailText(\sprintf( |
224 | - 'Uncaught exception "%s" in "%s" line %d with message: "%s"', |
|
225 | - \get_class($exception), |
|
226 | - $exception->getFile(), |
|
227 | - $exception->getLine(), |
|
228 | - $exception->getMessage() |
|
224 | + 'Uncaught exception "%s" in "%s" line %d with message: "%s"', |
|
225 | + \get_class($exception), |
|
226 | + $exception->getFile(), |
|
227 | + $exception->getLine(), |
|
228 | + $exception->getMessage() |
|
229 | 229 | )); |
230 | 230 | } |
231 | 231 | $this->terminateTest(); |
@@ -272,17 +272,17 @@ discard block |
||
272 | 272 | |
273 | 273 | if ($errorType === '[FATAL ERROR]') { |
274 | 274 | $this->printFailText(\sprintf( |
275 | - "A critical error has been caught: \"%s\" in %s line %d", |
|
276 | - "$errorType $errstr", |
|
277 | - $errfile, |
|
278 | - $errline |
|
275 | + "A critical error has been caught: \"%s\" in %s line %d", |
|
276 | + "$errorType $errstr", |
|
277 | + $errfile, |
|
278 | + $errline |
|
279 | 279 | )); |
280 | 280 | } else { |
281 | 281 | $this->printDebugText(\sprintf( |
282 | - "A non-critical error has been caught: \"%s\" in %s line %d", |
|
283 | - "$errorType $errstr", |
|
284 | - $errfile, |
|
285 | - $errline |
|
282 | + "A non-critical error has been caught: \"%s\" in %s line %d", |
|
283 | + "$errorType $errstr", |
|
284 | + $errfile, |
|
285 | + $errline |
|
286 | 286 | )); |
287 | 287 | } |
288 | 288 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * @author Georges.L (Geolim4) <[email protected]> |
12 | 12 | * |
13 | 13 | */ |
14 | -declare(strict_types=1); |
|
14 | +declare(strict_types = 1); |
|
15 | 15 | |
16 | 16 | namespace Phpfastcache\Exceptions; |
17 | 17 |
@@ -192,9 +192,9 @@ discard block |
||
192 | 192 | protected static function cleanFileName($filename): string |
193 | 193 | { |
194 | 194 | $regex = [ |
195 | - '/[\?\[\]\/\\\=\<\>\:\;\,\'\"\&\$\#\*\(\)\|\~\`\!\{\}]/', |
|
196 | - '/\.$/', |
|
197 | - '/^\./', |
|
195 | + '/[\?\[\]\/\\\=\<\>\:\;\,\'\"\&\$\#\*\(\)\|\~\`\!\{\}]/', |
|
196 | + '/\.$/', |
|
197 | + '/^\./', |
|
198 | 198 | ]; |
199 | 199 | $replace = ['-', '', '']; |
200 | 200 | |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | $tmpFilename = Directory::getAbsolutePath(\dirname($file) . '/tmp_' . \md5( |
291 | 291 | \str_shuffle(\uniqid($this->getDriverName(), false)) |
292 | 292 | . \str_shuffle(\uniqid($this->getDriverName(), false)) |
293 | - )); |
|
293 | + )); |
|
294 | 294 | |
295 | 295 | $f = \fopen($tmpFilename, 'w+'); |
296 | 296 | \flock($f, LOCK_EX); |
@@ -332,11 +332,11 @@ discard block |
||
332 | 332 | } |
333 | 333 | |
334 | 334 | $stat->setData(\implode(', ', \array_keys($this->itemInstances))) |
335 | - ->setRawData([ |
|
335 | + ->setRawData([ |
|
336 | 336 | 'tmp' => $this->tmp, |
337 | - ]) |
|
338 | - ->setSize(Directory::dirSize($path)) |
|
339 | - ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); |
|
337 | + ]) |
|
338 | + ->setSize(Directory::dirSize($path)) |
|
339 | + ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); |
|
340 | 340 | |
341 | 341 | return $stat; |
342 | 342 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * @author Georges.L (Geolim4) <[email protected]> |
12 | 12 | * |
13 | 13 | */ |
14 | -declare(strict_types=1); |
|
14 | +declare(strict_types = 1); |
|
15 | 15 | |
16 | 16 | namespace Phpfastcache\Core\Pool\IO; |
17 | 17 | |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | { |
57 | 57 | $securityKey = $this->getConfig()->getSecurityKey(); |
58 | 58 | if (!$securityKey || mb_strtolower($securityKey) === 'auto') { |
59 | - if (isset($_SERVER[ 'HTTP_HOST' ])) { |
|
60 | - $securityKey = preg_replace('/^www./', '', \strtolower(\str_replace(':', '_', $_SERVER[ 'HTTP_HOST' ]))); |
|
59 | + if (isset($_SERVER['HTTP_HOST'])) { |
|
60 | + $securityKey = preg_replace('/^www./', '', \strtolower(\str_replace(':', '_', $_SERVER['HTTP_HOST']))); |
|
61 | 61 | } else { |
62 | 62 | $securityKey = ($this->isPHPModule() ? 'web' : 'cli'); |
63 | 63 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | return $full_path; |
101 | 101 | } |
102 | 102 | |
103 | - if (!isset($this->tmp[ $full_path_hash ]) || (!@\file_exists($full_path) || !@\is_writable($full_path))) { |
|
103 | + if (!isset($this->tmp[$full_path_hash]) || (!@\file_exists($full_path) || !@\is_writable($full_path))) { |
|
104 | 104 | if (!@\file_exists($full_path)) { |
105 | 105 | @mkdir($full_path, $this->getDefaultChmod(), true); |
106 | 106 | } else if (!@\is_writable($full_path)) { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | throw new PhpfastcacheIOException('Path "' . $full_path . '" is not writable, please set a chmod 0777 or any writable permission and make sure to make use of an absolute path !'); |
126 | 126 | } |
127 | 127 | |
128 | - $this->tmp[ $full_path_hash ] = $full_path; |
|
128 | + $this->tmp[$full_path_hash] = $full_path; |
|
129 | 129 | $this->htaccessGen($full_path, \array_key_exists('htaccess', $this->getConfig()) ? $this->getConfig()->getHtaccess() : false); |
130 | 130 | } |
131 | 131 |