@@ -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\db\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\db\concern; |
14 | 14 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | foreach ($this->options['where'] as $logic => &$where) { |
53 | 53 | foreach ($where as $key => &$val) { |
54 | 54 | if (is_array($val) && !strpos($val[0], '.')) { |
55 | - $val[0] = $via . '.' . $val[0]; |
|
55 | + $val[0] = $via.'.'.$val[0]; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | } |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | $logic = strtoupper($logic); |
363 | 363 | |
364 | 364 | if (is_string($field) && !empty($this->options['via']) && false === strpos($field, '.')) { |
365 | - $field = $this->options['via'] . '.' . $field; |
|
365 | + $field = $this->options['via'].'.'.$field; |
|
366 | 366 | } |
367 | 367 | |
368 | 368 | if ($field instanceof Raw) { |
@@ -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\db\concern; |
14 | 14 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $op = 'between'; |
62 | 62 | } |
63 | 63 | |
64 | - return $this->parseWhereExp($logic, $field, strtolower($op) . ' time', $range, [], true); |
|
64 | + return $this->parseWhereExp($logic, $field, strtolower($op).' time', $range, [], true); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | public function whereTimeInterval(string $field, string $start, string $interval = 'day', int $step = 1, string $logic = 'AND') |
78 | 78 | { |
79 | 79 | $startTime = strtotime($start); |
80 | - $endTime = strtotime(($step > 0 ? '+' : '-') . abs($step) . ' ' . $interval . (abs($step) > 1 ? 's' : ''), $startTime); |
|
80 | + $endTime = strtotime(($step > 0 ? '+' : '-').abs($step).' '.$interval.(abs($step) > 1 ? 's' : ''), $startTime); |
|
81 | 81 | |
82 | 82 | return $this->whereTime($field, 'between', $step > 0 ? [$startTime, $endTime] : [$endTime, $startTime], $logic); |
83 | 83 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $year = date('Y', strtotime($year)); |
134 | 134 | } |
135 | 135 | |
136 | - return $this->whereTimeInterval($field, $year . '-1-1', 'year', $step, $logic); |
|
136 | + return $this->whereTimeInterval($field, $year.'-1-1', 'year', $step, $logic); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -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\db\concern; |
14 | 14 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | // 支持GROUP |
43 | 43 | $options = $this->getOptions(); |
44 | 44 | $subSql = $this->options($options) |
45 | - ->field('count(' . $field . ') AS think_count') |
|
45 | + ->field('count('.$field.') AS think_count') |
|
46 | 46 | ->bind($this->bind) |
47 | 47 | ->buildSql(); |
48 | 48 |