@@ -8,7 +8,7 @@ |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: yunwuxin <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think\exception; |
| 14 | 14 | |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: yunwuxin <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think\exception; |
| 14 | 14 | |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: yunwuxin <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think\exception; |
| 14 | 14 | |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: yunwuxin <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think\exception; |
| 14 | 14 | |
@@ -8,7 +8,7 @@ |
||
| 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\response; |
| 14 | 14 | |
@@ -8,7 +8,7 @@ |
||
| 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\response; |
| 14 | 14 | |
@@ -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; |
| 14 | 14 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function getCacheKey(string $name): string |
| 86 | 86 | { |
| 87 | - return $this->options['prefix'] . $name; |
|
| 87 | + return $this->options['prefix'].$name; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
@@ -145,14 +145,14 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $time = time(); |
| 147 | 147 | |
| 148 | - while ($time + 5 > time() && $this->has($name . '_lock')) { |
|
| 148 | + while ($time + 5 > time() && $this->has($name.'_lock')) { |
|
| 149 | 149 | // 存在锁定则等待 |
| 150 | 150 | usleep(200000); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | try { |
| 154 | 154 | // 锁定 |
| 155 | - $this->set($name . '_lock', true); |
|
| 155 | + $this->set($name.'_lock', true); |
|
| 156 | 156 | |
| 157 | 157 | if ($value instanceof Closure) { |
| 158 | 158 | // 获取缓存数据 |
@@ -163,9 +163,9 @@ discard block |
||
| 163 | 163 | $this->set($name, $value, $expire); |
| 164 | 164 | |
| 165 | 165 | // 解锁 |
| 166 | - $this->delete($name . '_lock'); |
|
| 166 | + $this->delete($name.'_lock'); |
|
| 167 | 167 | } catch (Exception | throwable $e) { |
| 168 | - $this->delete($name . '_lock'); |
|
| 168 | + $this->delete($name.'_lock'); |
|
| 169 | 169 | throw $e; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $key = implode('-', $name); |
| 185 | 185 | |
| 186 | 186 | if (!isset($this->tag[$key])) { |
| 187 | - $name = array_map(function ($val) { |
|
| 187 | + $name = array_map(function($val) { |
|
| 188 | 188 | return $this->getTagKey($val); |
| 189 | 189 | }, $name); |
| 190 | 190 | $this->tag[$key] = new TagSet($name, $this); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function getTagKey(string $tag): string |
| 214 | 214 | { |
| 215 | - return $this->options['tag_prefix'] . md5($tag); |
|
| 215 | + return $this->options['tag_prefix'].md5($tag); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
@@ -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\route; |
| 14 | 14 | |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $this->parseUrlParams($array[2], $param); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - return new CallbackDispatch($request, $this, [$namespace . '\\' . Str::studly($class), $method], $param); |
|
| 159 | + return new CallbackDispatch($request, $this, [$namespace.'\\'.Str::studly($class), $method], $param); |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $this->parseUrlParams($array[1], $param); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - return new ControllerDispatch($request, $this, $controller . '/' . $action, $param); |
|
| 180 | + return new ControllerDispatch($request, $this, $controller.'/'.$action, $param); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: yunwuxin <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think\service; |
| 14 | 14 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | Model::setDb($this->app->db); |
| 26 | 26 | Model::setEvent($this->app->event); |
| 27 | 27 | Model::setInvoker([$this->app, 'invoke']); |
| 28 | - Model::maker(function (Model $model) { |
|
| 28 | + Model::maker(function(Model $model) { |
|
| 29 | 29 | $config = $this->app->config; |
| 30 | 30 | |
| 31 | 31 | $isAutoWriteTimestamp = $model->getAutoWriteTimestamp(); |