@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | { |
54 | 54 | $this->checkStorage(); |
55 | 55 | $content = $this->storage->read($key); |
56 | - return empty($content) ? null : $content ; |
|
56 | + return empty($content) ? null : $content; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $this->checkStorage(); |
84 | 84 | // safeadd for multithread at any system |
85 | 85 | if ($this->storage->write($key, $value, $expire)) { |
86 | - return ( $value == $this->get($key) ); |
|
86 | + return ($value == $this->get($key)); |
|
87 | 87 | } |
88 | 88 | return false; |
89 | 89 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $keysToDelete = []; |
160 | 160 | foreach ($this->getAllKeys() as $memKey) { |
161 | 161 | $find = strpos($memKey, $prefix); |
162 | - if ((! $inverse && $find === 0) || ($inverse && ($find === false || $find !== 0))) { |
|
162 | + if ((!$inverse && $find === 0) || ($inverse && ($find === false || $find !== 0))) { |
|
163 | 163 | $keysToDelete[] = $memKey; |
164 | 164 | } |
165 | 165 | } |
@@ -40,6 +40,6 @@ |
||
40 | 40 | if (is_string($data)) { |
41 | 41 | return $data; |
42 | 42 | } |
43 | - return (string)json_encode($data); |
|
43 | + return (string) json_encode($data); |
|
44 | 44 | } |
45 | 45 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | class DirKey implements IKey |
10 | 10 | { |
11 | 11 | /** @var string */ |
12 | - protected static $dir= '/var/cache/wwwcache/'; |
|
12 | + protected static $dir = '/var/cache/wwwcache/'; |
|
13 | 13 | |
14 | 14 | public static function setDir(string $dir): void |
15 | 15 | { |