@@ -376,7 +376,7 @@ |
||
376 | 376 | |
377 | 377 | return (string) preg_replace_callback( |
378 | 378 | '/\?/', |
379 | - function () use ($driver, &$params) { |
|
379 | + function() use ($driver, &$params) { |
|
380 | 380 | $param = array_shift($params); |
381 | 381 | |
382 | 382 | $value = is_object($param) ? get_class($param) : $param; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * @param int $fetchStyle the PDO fetch style |
96 | 96 | * @return array<int, mixed>|false |
97 | 97 | */ |
98 | - public function all(?callable $callable = null, int $fetchStyle = 0): array|false |
|
98 | + public function all(?callable $callable = null, int $fetchStyle = 0): array | false |
|
99 | 99 | { |
100 | 100 | if ($callable === null) { |
101 | 101 | return $this->statement->fetchAll($fetchStyle); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * @param callable|null $callable |
110 | 110 | * @return array<int, mixed>|false |
111 | 111 | */ |
112 | - public function allGroup(bool $uniq = false, ?callable $callable = null): array|false |
|
112 | + public function allGroup(bool $uniq = false, ?callable $callable = null): array | false |
|
113 | 113 | { |
114 | 114 | $fetchStyle = PDO::FETCH_GROUP | ($uniq ? PDO::FETCH_UNIQUE : 0); |
115 | 115 |
@@ -123,7 +123,7 @@ |
||
123 | 123 | * @param string|array<string> $tables Table name or an array of tables |
124 | 124 | * @return QueryCommand |
125 | 125 | */ |
126 | - public function from(string|array $tables): QueryCommand |
|
126 | + public function from(string | array $tables): QueryCommand |
|
127 | 127 | { |
128 | 128 | return new QueryCommand($this->connection, $tables); |
129 | 129 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | * @param string|null $name |
200 | 200 | * @return $this |
201 | 201 | */ |
202 | - public function primary(string|array $columns, ?string $name = null): self |
|
202 | + public function primary(string | array $columns, ?string $name = null): self |
|
203 | 203 | { |
204 | 204 | if (!is_array($columns)) { |
205 | 205 | $columns = [$columns]; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * @param string|null $name |
224 | 224 | * @return $this |
225 | 225 | */ |
226 | - public function unique(string|array $columns, ?string $name = null): self |
|
226 | + public function unique(string | array $columns, ?string $name = null): self |
|
227 | 227 | { |
228 | 228 | if (!is_array($columns)) { |
229 | 229 | $columns = [$columns]; |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | * @param string|null $name |
245 | 245 | * @return $this |
246 | 246 | */ |
247 | - public function index(string|array $columns, ?string $name = null): self |
|
247 | + public function index(string | array $columns, ?string $name = null): self |
|
248 | 248 | { |
249 | 249 | if (!is_array($columns)) { |
250 | 250 | $columns = [$columns]; |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | * @param string|null $name |
266 | 266 | * @return ForeignKey |
267 | 267 | */ |
268 | - public function foreign(string|array $columns, ?string $name = null): ForeignKey |
|
268 | + public function foreign(string | array $columns, ?string $name = null): ForeignKey |
|
269 | 269 | { |
270 | 270 | if (!is_array($columns)) { |
271 | 271 | $columns = [$columns]; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function __construct( |
70 | 70 | Connection $connection, |
71 | - string|array $from, |
|
71 | + string | array $from, |
|
72 | 72 | ?QueryStatement $queryStatement = null |
73 | 73 | ) { |
74 | 74 | parent::__construct($from, $queryStatement); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @return int |
84 | 84 | * @throws QueryException |
85 | 85 | */ |
86 | - public function delete(string|array $tables = []): int |
|
86 | + public function delete(string | array $tables = []): int |
|
87 | 87 | { |
88 | 88 | parent::delete($tables); |
89 | 89 | $driver = $this->connection->getDriver(); |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | * @return $this |
76 | 76 | */ |
77 | 77 | public function on( |
78 | - string|Expression|Closure $column1, |
|
79 | - string|Expression|Closure|bool|null $column2 = null, |
|
78 | + string | Expression | Closure $column1, |
|
79 | + string | Expression | Closure | bool | null $column2 = null, |
|
80 | 80 | string $operator = '=' |
81 | 81 | ): self { |
82 | 82 | return $this->addJoinCondition($column1, $column2, $operator, 'AND'); |
@@ -89,8 +89,8 @@ discard block |
||
89 | 89 | * @return $this |
90 | 90 | */ |
91 | 91 | public function andOn( |
92 | - string|Expression|Closure $column1, |
|
93 | - string|Expression|Closure|bool|null $column2 = null, |
|
92 | + string | Expression | Closure $column1, |
|
93 | + string | Expression | Closure | bool | null $column2 = null, |
|
94 | 94 | string $operator = '=' |
95 | 95 | ): self { |
96 | 96 | return $this->addJoinCondition($column1, $column2, $operator, 'AND'); |
@@ -103,8 +103,8 @@ discard block |
||
103 | 103 | * @return $this |
104 | 104 | */ |
105 | 105 | public function orOn( |
106 | - string|Expression|Closure $column1, |
|
107 | - string|Expression|Closure|bool|null $column2 = null, |
|
106 | + string | Expression | Closure $column1, |
|
107 | + string | Expression | Closure | bool | null $column2 = null, |
|
108 | 108 | string $operator = '=' |
109 | 109 | ): self { |
110 | 110 | return $this->addJoinCondition($column1, $column2, $operator, 'OR'); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @param string $separator |
116 | 116 | * @return $this |
117 | 117 | */ |
118 | - protected function addJoinExpression(Expression|Closure $expression, string $separator = 'AND'): self |
|
118 | + protected function addJoinExpression(Expression | Closure $expression, string $separator = 'AND'): self |
|
119 | 119 | { |
120 | 120 | if ($expression instanceof Closure) { |
121 | 121 | $expression = Expression::fromClosure($expression); |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | * @return $this |
139 | 139 | */ |
140 | 140 | protected function addJoinCondition( |
141 | - string|Expression|Closure $column1, |
|
142 | - string|Expression|Closure|bool|null $column2, |
|
141 | + string | Expression | Closure $column1, |
|
142 | + string | Expression | Closure | bool | null $column2, |
|
143 | 143 | string $operator, |
144 | 144 | string $separator = 'AND' |
145 | 145 | ): self { |
@@ -62,7 +62,7 @@ |
||
62 | 62 | * @param string|array<int, string> $tables |
63 | 63 | * @return SelectStatement |
64 | 64 | */ |
65 | - public function from(string|array $tables): SelectStatement |
|
65 | + public function from(string | array $tables): SelectStatement |
|
66 | 66 | { |
67 | 67 | return $this->select = new SelectStatement($tables); |
68 | 68 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | /** |
58 | 58 | * @var string|Expression |
59 | 59 | */ |
60 | - protected string|Expression $aggregate; |
|
60 | + protected string | Expression $aggregate; |
|
61 | 61 | |
62 | 62 | /** |
63 | 63 | * @var string |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * @param string $separator |
85 | 85 | * @return self |
86 | 86 | */ |
87 | - public function init(string|Expression|Closure $aggregate, string $separator): self |
|
87 | + public function init(string | Expression | Closure $aggregate, string $separator): self |
|
88 | 88 | { |
89 | 89 | if ($aggregate instanceof Closure) { |
90 | 90 | $aggregate = Expression::fromClosure($aggregate); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | * @param array<int, mixed>|Closure $value |
212 | 212 | * @return void |
213 | 213 | */ |
214 | - public function in(array|Closure $value): void |
|
214 | + public function in(array | Closure $value): void |
|
215 | 215 | { |
216 | 216 | $this->queryStatement->addHavingIn( |
217 | 217 | $this->aggregate, |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | * @param array<int, mixed>|Closure $value |
226 | 226 | * @return void |
227 | 227 | */ |
228 | - public function notIn(array|Closure $value): void |
|
228 | + public function notIn(array | Closure $value): void |
|
229 | 229 | { |
230 | 230 | $this->queryStatement->addHavingIn( |
231 | 231 | $this->aggregate, |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * |
61 | 61 | * @return Delete|Select|BaseStatement |
62 | 62 | */ |
63 | - public function join(array|string $table, Closure $closure): Delete|Select|BaseStatement |
|
63 | + public function join(array | string $table, Closure $closure): Delete | Select | BaseStatement |
|
64 | 64 | { |
65 | 65 | $this->queryStatement->addJoinClause('INNER', $table, $closure); |
66 | 66 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * |
74 | 74 | * @return Delete|Select|BaseStatement |
75 | 75 | */ |
76 | - public function leftJoin(array|string $table, Closure $closure): Delete|Select|BaseStatement |
|
76 | + public function leftJoin(array | string $table, Closure $closure): Delete | Select | BaseStatement |
|
77 | 77 | { |
78 | 78 | $this->queryStatement->addJoinClause('LEFT', $table, $closure); |
79 | 79 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * |
87 | 87 | * @return Delete|Select|BaseStatement |
88 | 88 | */ |
89 | - public function rightJoin(array|string $table, Closure $closure): Delete|Select|BaseStatement |
|
89 | + public function rightJoin(array | string $table, Closure $closure): Delete | Select | BaseStatement |
|
90 | 90 | { |
91 | 91 | $this->queryStatement->addJoinClause('RIGHT', $table, $closure); |
92 | 92 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * |
100 | 100 | * @return Delete|Select|BaseStatement |
101 | 101 | */ |
102 | - public function fullJoin(array|string $table, Closure $closure): Delete|Select|BaseStatement |
|
102 | + public function fullJoin(array | string $table, Closure $closure): Delete | Select | BaseStatement |
|
103 | 103 | { |
104 | 104 | $this->queryStatement->addJoinClause('FULL', $table, $closure); |
105 | 105 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * |
113 | 113 | * @return Delete|Select|BaseStatement |
114 | 114 | */ |
115 | - public function crossJoin(array|string $table, Closure $closure): Delete|Select|BaseStatement |
|
115 | + public function crossJoin(array | string $table, Closure $closure): Delete | Select | BaseStatement |
|
116 | 116 | { |
117 | 117 | $this->queryStatement->addJoinClause('CROSS', $table, $closure); |
118 | 118 |