@@ -76,9 +76,9 @@ |
||
76 | 76 | { |
77 | 77 | $file_path = $this->getFilePath($item->getKey(), true); |
78 | 78 | |
79 | - try{ |
|
79 | + try { |
|
80 | 80 | $content = $this->readFile($file_path); |
81 | - }catch (PhpfastcacheIOException $e){ |
|
81 | + } catch (PhpfastcacheIOException $e) { |
|
82 | 82 | return null; |
83 | 83 | } |
84 | 84 |
@@ -78,7 +78,7 @@ |
||
78 | 78 | |
79 | 79 | try{ |
80 | 80 | $content = $this->readFile($file_path); |
81 | - }catch (PhpfastcacheIOException $e){ |
|
81 | + } catch (PhpfastcacheIOException $e){ |
|
82 | 82 | return null; |
83 | 83 | } |
84 | 84 |
@@ -91,8 +91,7 @@ discard block |
||
91 | 91 | return unlink($source); |
92 | 92 | } |
93 | 93 | |
94 | - $files = new RecursiveIteratorIterator |
|
95 | - ( |
|
94 | + $files = new RecursiveIteratorIterator( |
|
96 | 95 | new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS), |
97 | 96 | RecursiveIteratorIterator::CHILD_FIRST |
98 | 97 | ); |
@@ -102,7 +101,7 @@ discard block |
||
102 | 101 | * @var SplFileInfo $fileinfo |
103 | 102 | */ |
104 | 103 | $realpath = $fileinfo->getRealPath(); |
105 | - if($realpath){ |
|
104 | + if ($realpath) { |
|
106 | 105 | if ($fileinfo->isDir()) { |
107 | 106 | if (self::rrmdir($fileinfo->getRealPath()) === false) { |
108 | 107 | return false; |
@@ -111,7 +110,7 @@ discard block |
||
111 | 110 | return false; |
112 | 111 | } |
113 | 112 | } |
114 | - else{ |
|
113 | + else { |
|
115 | 114 | return false; |
116 | 115 | } |
117 | 116 | } |
@@ -148,7 +147,7 @@ discard block |
||
148 | 147 | /** |
149 | 148 | * Allows to dereference char |
150 | 149 | */ |
151 | - $__FILE__ = preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__);// remove file protocols such as "phar://" etc. |
|
150 | + $__FILE__ = preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__); // remove file protocols such as "phar://" etc. |
|
152 | 151 | $prefix = $__FILE__[0] === DIRECTORY_SEPARATOR ? DIRECTORY_SEPARATOR : ''; |
153 | 152 | return $prefix . implode(DIRECTORY_SEPARATOR, $absolutes); |
154 | 153 | } |
@@ -110,8 +110,7 @@ |
||
110 | 110 | } elseif (unlink($realpath) === false) { |
111 | 111 | return false; |
112 | 112 | } |
113 | - } |
|
114 | - else{ |
|
113 | + } else{ |
|
115 | 114 | return false; |
116 | 115 | } |
117 | 116 | } |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | ->setSize(Directory::dirSize($path)) |
65 | 65 | ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); |
66 | 66 | |
67 | - if($this->getConfig()->isUseStaticItemCaching()){ |
|
67 | + if ($this->getConfig()->isUseStaticItemCaching()) { |
|
68 | 68 | $stat->setData(implode(', ', \array_keys($this->itemInstances))); |
69 | - }else{ |
|
69 | + } else { |
|
70 | 70 | $stat->setData('No data available since static item caching option (useStaticItemCaching) is disabled.'); |
71 | 71 | } |
72 | 72 | |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | throw new PhpfastcacheIOException("Cannot read file located at: {$file}"); |
295 | 295 | } |
296 | 296 | if (\function_exists('file_get_contents')) { |
297 | - return (string)\file_get_contents($file); |
|
297 | + return (string) \file_get_contents($file); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | $string = ''; |
@@ -360,6 +360,6 @@ discard block |
||
360 | 360 | } |
361 | 361 | } |
362 | 362 | |
363 | - return (bool)($octetWritten ?? false); |
|
363 | + return (bool) ($octetWritten ?? false); |
|
364 | 364 | } |
365 | 365 | } |