@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | public function clear(string $namespace = null) : bool |
166 | 166 | { |
167 | 167 | $dir = $this->getBasePath($namespace); |
168 | - $files = $this->streamSafeGlob($dir, '*.cache'.self::JSON_FORMAT); |
|
168 | + $files = $this->streamSafeGlob($dir, '*.cache' . self::JSON_FORMAT); |
|
169 | 169 | foreach ($files as $file) { |
170 | 170 | if (is_file($file)) { |
171 | 171 | if (!unlink($file)) { |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | public function setCacheDirectory(string $cacheDirectory) : bool |
188 | 188 | { |
189 | 189 | $this->cacheDirectory = null; |
190 | - $cacheDirectory = rtrim($cacheDirectory, '//, ').'/'; |
|
190 | + $cacheDirectory = rtrim($cacheDirectory, '//, ') . '/'; |
|
191 | 191 | if (!((file_exists($cacheDirectory) && is_writable($cacheDirectory)) || @mkdir($cacheDirectory, 0755, true))) { |
192 | 192 | $this->setLastError(new Exception("Failed to use $cacheDirectory as cache directory.")); |
193 | 193 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | */ |
218 | 218 | private function getFilePath(string $key) : string |
219 | 219 | { |
220 | - return $this->getBasePath($this->namespace).$key.'.cache'.self::JSON_FORMAT; |
|
220 | + return $this->getBasePath($this->namespace) . $key . '.cache' . self::JSON_FORMAT; |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | */ |
228 | 228 | private function getBasePath(string $namespace = null) : string |
229 | 229 | { |
230 | - return $this->cacheDirectory.(!empty($namespace) ? $namespace.DIRECTORY_SEPARATOR : ''); |
|
230 | + return $this->cacheDirectory . (!empty($namespace) ? $namespace . DIRECTORY_SEPARATOR : ''); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |