@@ -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 | { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | $this->checkStorage(); |
| 55 | 55 | $content = $this->storage->/** @scrutinizer ignore-call */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->/** @scrutinizer ignore-call */write($key, $value, $expire)) { |
| 86 | - return ( $value == $this->get($key) ); |
|
| 86 | + return ($value == $this->get($key)); |
|
| 87 | 87 | } |
| 88 | 88 | return false; |
| 89 | 89 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $keysToDelete = []; |
| 171 | 171 | foreach ($this->getAllKeys() as $memKey) { |
| 172 | 172 | $find = strpos($memKey, $prefix); |
| 173 | - if ((! $inverse && 0 === $find) || ($inverse && (false === $find || 0 !== $find))) { |
|
| 173 | + if ((!$inverse && 0 === $find) || ($inverse && (false === $find || 0 !== $find))) { |
|
| 174 | 174 | $keysToDelete[] = $memKey; |
| 175 | 175 | } |
| 176 | 176 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | public static function removeFromEnd(string $path, string $separator = DIRECTORY_SEPARATOR): string |
| 20 | 20 | { |
| 21 | 21 | $signLen = mb_strlen($separator); |
| 22 | - return ($separator == mb_substr($path, -1 * $signLen)) ? mb_substr($path, 0, -1 * $signLen) : $path ; |
|
| 22 | + return ($separator == mb_substr($path, -1 * $signLen)) ? mb_substr($path, 0, -1 * $signLen) : $path; |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -31,6 +31,6 @@ discard block |
||
| 31 | 31 | public static function removeFromStart(string $path, string $separator = DIRECTORY_SEPARATOR): string |
| 32 | 32 | { |
| 33 | 33 | $signLen = mb_strlen($separator); |
| 34 | - return ($separator == mb_substr($path, 0, $signLen)) ? mb_substr($path, $signLen) : $path ; |
|
| 34 | + return ($separator == mb_substr($path, 0, $signLen)) ? mb_substr($path, $signLen) : $path; |
|
| 35 | 35 | } |
| 36 | 36 | } |