@@ -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 @@ 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 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | { |
235 | 235 | $comment = substr($comment, 3, -2); |
236 | 236 | $comment = explode(PHP_EOL, substr(strstr(trim($comment), $tag), 1)); |
237 | - $comment = array_map(function ($item) {return trim(trim($item), ' \t*');}, $comment); |
|
237 | + $comment = array_map(function($item) {return trim(trim($item), ' \t*'); }, $comment); |
|
238 | 238 | |
239 | 239 | if (count($comment) > 1) { |
240 | 240 | $key = array_search('', $comment); |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $comment = implode(PHP_EOL . "\t", $comment) . ';'; |
245 | 245 | |
246 | 246 | if (strpos($comment, '{')) { |
247 | - $comment = preg_replace_callback('/\{\s?.*?\s?\}/s', function ($matches) { |
|
247 | + $comment = preg_replace_callback('/\{\s?.*?\s?\}/s', function($matches) { |
|
248 | 248 | return false !== strpos($matches[0], '"') ? '[' . substr(var_export(json_decode($matches[0], true), true), 7, -1) . ']' : $matches[0]; |
249 | 249 | }, $comment); |
250 | 250 | } |
@@ -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 |
@@ -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\model\relation; |
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\model\relation; |
14 | 14 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | |
145 | 145 | return $this->parent->db() |
146 | 146 | ->alias($model) |
147 | - ->whereExists(function ($query) use ($table, $model, $relation, $localKey, $foreignKey) { |
|
147 | + ->whereExists(function($query) use ($table, $model, $relation, $localKey, $foreignKey) { |
|
148 | 148 | $query->table([$table => $relation]) |
149 | 149 | ->field($relation . '.' . $localKey) |
150 | 150 | ->whereExp($model . '.' . $foreignKey, '=' . $relation . '.' . $localKey); |
@@ -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\model\relation; |
14 | 14 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | return $this->parent->db() |
144 | 144 | ->alias($model) |
145 | - ->whereExists(function ($query) use ($table, $model, $relation, $localKey, $foreignKey) { |
|
145 | + ->whereExists(function($query) use ($table, $model, $relation, $localKey, $foreignKey) { |
|
146 | 146 | $query->table([$table => $relation]) |
147 | 147 | ->field($relation . '.' . $foreignKey) |
148 | 148 | ->whereExp($model . '.' . $localKey, '=' . $relation . '.' . $foreignKey); |
@@ -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\model\concern; |
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\model\concern; |
14 | 14 | |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | */ |
284 | 284 | public function getChangedData(): array |
285 | 285 | { |
286 | - $data = $this->force ? $this->data : array_udiff_assoc($this->data, $this->origin, function ($a, $b) { |
|
286 | + $data = $this->force ? $this->data : array_udiff_assoc($this->data, $this->origin, function($a, $b) { |
|
287 | 287 | if ((empty($a) || empty($b)) && $a !== $b) { |
288 | 288 | return 1; |
289 | 289 | } |
@@ -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\model\concern; |
14 | 14 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $query->where($data); |
156 | 156 | $data = null; |
157 | 157 | } elseif ($data instanceof \Closure) { |
158 | - call_user_func_array($data, [ & $query]); |
|
158 | + call_user_func_array($data, [& $query]); |
|
159 | 159 | $data = null; |
160 | 160 | } elseif (is_null($data)) { |
161 | 161 | return false; |