@@ -8,7 +8,7 @@ |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: 麦当苗儿 <[email protected]> <http://zjzit.cn> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think; |
| 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\route\dispatch; |
| 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\validate; |
| 14 | 14 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $default = $this->getDefault(); |
| 42 | 42 | $regex = $this->trueAnswerRegex; |
| 43 | 43 | |
| 44 | - return function ($answer) use ($default, $regex) { |
|
| 44 | + return function($answer) use ($default, $regex) { |
|
| 45 | 45 | if (is_bool($answer)) { |
| 46 | 46 | return $answer; |
| 47 | 47 | } |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | $multiselect = $this->multiselect; |
| 109 | 109 | $isAssoc = $this->isAssoc($choices); |
| 110 | 110 | |
| 111 | - return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) { |
|
| 111 | + return function($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) { |
|
| 112 | 112 | // Collapse all spaces. |
| 113 | 113 | $selectedChoices = str_replace(' ', '', $selected); |
| 114 | 114 | |
@@ -188,8 +188,7 @@ |
||
| 188 | 188 | $key = $this->getCacheKey($name); |
| 189 | 189 | |
| 190 | 190 | return false === $ttl ? |
| 191 | - $this->handler->delete($key) : |
|
| 192 | - $this->handler->delete($key, $ttl); |
|
| 191 | + $this->handler->delete($key) : $this->handler->delete($key, $ttl); |
|
| 193 | 192 | } |
| 194 | 193 | |
| 195 | 194 | /** |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: zhangyajun <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think; |
| 14 | 14 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | public function toArray(): array |
| 50 | 50 | { |
| 51 | - return array_map(function ($value) { |
|
| 51 | + return array_map(function($value) { |
|
| 52 | 52 | return ($value instanceof Model || $value instanceof self) ? $value->toArray() : $value; |
| 53 | 53 | }, $this->items); |
| 54 | 54 | } |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | $operator = '='; |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | - return $this->filter(function ($data) use ($field, $operator, $value) { |
|
| 338 | + return $this->filter(function($data) use ($field, $operator, $value) { |
|
| 339 | 339 | if (strpos($field, '.')) { |
| 340 | 340 | list($field, $relation) = explode('.', $field); |
| 341 | 341 | |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | { |
| 478 | 478 | $items = $this->items; |
| 479 | 479 | |
| 480 | - $callback = $callback ?: function ($a, $b) { |
|
| 480 | + $callback = $callback ?: function($a, $b) { |
|
| 481 | 481 | return $a == $b ? 0 : (($a < $b) ? -1 : 1); |
| 482 | 482 | |
| 483 | 483 | }; |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | */ |
| 497 | 497 | public function order(string $field, string $order = null) |
| 498 | 498 | { |
| 499 | - return $this->sort(function ($a, $b) use ($field, $order) { |
|
| 499 | + return $this->sort(function($a, $b) use ($field, $order) { |
|
| 500 | 500 | $fieldA = $a[$field] ?? null; |
| 501 | 501 | $fieldB = $b[$field] ?? null; |
| 502 | 502 | |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: Slince <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think; |
| 14 | 14 | |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | protected function resolve(string $type = 'route') |
| 172 | 172 | { |
| 173 | - return function (Request $request) use ($type) { |
|
| 173 | + return function(Request $request) use ($type) { |
|
| 174 | 174 | $middleware = array_shift($this->queue[$type]); |
| 175 | 175 | |
| 176 | 176 | if (null === $middleware) { |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: 麦当苗儿 <[email protected]> <http://zjzit.cn> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think\db\exception; |
| 14 | 14 | |