@@ -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 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | public function get(string $key): ?string |
| 61 | 61 | { |
| 62 | 62 | $content = $this->getStorage()->read($key); |
| 63 | - return empty($content) ? null : $content ; |
|
| 63 | + return empty($content) ? null : $content; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | { |
| 89 | 89 | // safeadd for multithread on any system |
| 90 | 90 | if ($this->getStorage()->write($key, $value, $expire)) { |
| 91 | - return ( $value == $this->get($key) ); |
|
| 91 | + return ($value == $this->get($key)); |
|
| 92 | 92 | } |
| 93 | 93 | return false; |
| 94 | 94 | } |
@@ -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 | } |