@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | // +---------------------------------------------------------------------- |
9 | 9 | // | Author: liu21st <[email protected]> |
10 | 10 | // +---------------------------------------------------------------------- |
11 | -declare (strict_types = 1); |
|
11 | +declare(strict_types=1); |
|
12 | 12 | |
13 | 13 | namespace think\cache\driver; |
14 | 14 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | if (empty($this->options['path'])) { |
51 | - $this->options['path'] = $app->getRuntimePath() . 'cache'; |
|
51 | + $this->options['path'] = $app->getRuntimePath().'cache'; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | if (substr($this->options['path'], -1) != DIRECTORY_SEPARATOR) { |
@@ -68,14 +68,14 @@ discard block |
||
68 | 68 | |
69 | 69 | if ($this->options['cache_subdir']) { |
70 | 70 | // 使用子目录 |
71 | - $name = substr($name, 0, 2) . DIRECTORY_SEPARATOR . substr($name, 2); |
|
71 | + $name = substr($name, 0, 2).DIRECTORY_SEPARATOR.substr($name, 2); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | if ($this->options['prefix']) { |
75 | - $name = $this->options['prefix'] . DIRECTORY_SEPARATOR . $name; |
|
75 | + $name = $this->options['prefix'].DIRECTORY_SEPARATOR.$name; |
|
76 | 76 | } |
77 | 77 | |
78 | - return $this->options['path'] . $name . '.php'; |
|
78 | + return $this->options['path'].$name.'.php'; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $data = gzcompress($data, 3); |
176 | 176 | } |
177 | 177 | |
178 | - $data = "<?php\n//" . sprintf('%012d', $expire) . "\n exit();?>\n" . $data; |
|
178 | + $data = "<?php\n//".sprintf('%012d', $expire)."\n exit();?>\n".$data; |
|
179 | 179 | $result = file_put_contents($filename, $data, LOCK_EX); |
180 | 180 | |
181 | 181 | if ($result) { |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | { |
241 | 241 | $this->writeTimes++; |
242 | 242 | |
243 | - $dirname = $this->options['path'] . $this->options['prefix']; |
|
243 | + $dirname = $this->options['path'].$this->options['prefix']; |
|
244 | 244 | |
245 | 245 | $this->rmdir($dirname); |
246 | 246 |