@@ -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; |
14 | 14 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | { |
98 | 98 | $target = $this->getTargetFile($directory, $name); |
99 | 99 | |
100 | - set_error_handler(function ($type, $msg) use (&$error) { |
|
100 | + set_error_handler(function($type, $msg) use (&$error) { |
|
101 | 101 | $error = $msg; |
102 | 102 | }); |
103 | 103 | $renamed = rename($this->getPathname(), (string) $target); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | throw new FileException(sprintf('Unable to write in the "%s" directory', $directory)); |
128 | 128 | } |
129 | 129 | |
130 | - $target = rtrim($directory, '/\\') . \DIRECTORY_SEPARATOR . (null === $name ? $this->getBasename() : $this->getName($name)); |
|
130 | + $target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name)); |
|
131 | 131 | |
132 | 132 | return new self($target, false); |
133 | 133 | } |
@@ -170,18 +170,18 @@ discard block |
||
170 | 170 | switch (true) { |
171 | 171 | case in_array($rule, hash_algos()): |
172 | 172 | $hash = $this->hash($rule); |
173 | - $this->hashName = substr($hash, 0, 2) . DIRECTORY_SEPARATOR . substr($hash, 2); |
|
173 | + $this->hashName = substr($hash, 0, 2).DIRECTORY_SEPARATOR.substr($hash, 2); |
|
174 | 174 | break; |
175 | 175 | case is_callable($rule): |
176 | 176 | $this->hashName = call_user_func($rule); |
177 | 177 | break; |
178 | 178 | default: |
179 | - $this->hashName = date('Ymd') . DIRECTORY_SEPARATOR . md5((string) microtime(true)); |
|
179 | + $this->hashName = date('Ymd').DIRECTORY_SEPARATOR.md5((string) microtime(true)); |
|
180 | 180 | break; |
181 | 181 | } |
182 | 182 | } |
183 | 183 | } |
184 | 184 | |
185 | - return $this->hashName . '.' . $this->extension(); |
|
185 | + return $this->hashName.'.'.$this->extension(); |
|
186 | 186 | } |
187 | 187 | } |