@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | /** |
| 58 | 58 | * @var string|Expression |
| 59 | 59 | */ |
| 60 | - protected string|Expression $column; |
|
| 60 | + protected string | Expression $column; |
|
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * @var string |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | * @param string $separator |
| 81 | 81 | * @return $this |
| 82 | 82 | */ |
| 83 | - public function init(string|Expression|Closure $column, string $separator): self |
|
| 83 | + public function init(string | Expression | Closure $column, string $separator): self |
|
| 84 | 84 | { |
| 85 | 85 | if ($column instanceof Closure) { |
| 86 | 86 | $column = Expression::fromClosure($column); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | string $literal, |
| 102 | 102 | mixed $value, |
| 103 | 103 | bool $isColumn = false |
| 104 | - ): WhereStatement|Select|Delete|Update { |
|
| 104 | + ): WhereStatement | Select | Delete | Update { |
|
| 105 | 105 | return $this->addCondition($value, $literal, $isColumn); |
| 106 | 106 | } |
| 107 | 107 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @param bool $isColumn |
| 111 | 111 | * @return WhereStatement|Select|Delete|Update |
| 112 | 112 | */ |
| 113 | - public function is(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update |
|
| 113 | + public function is(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update |
|
| 114 | 114 | { |
| 115 | 115 | return $this->addCondition($value, '=', $isColumn); |
| 116 | 116 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * @param bool $isColumn |
| 121 | 121 | * @return WhereStatement|Select|Delete|Update |
| 122 | 122 | */ |
| 123 | - public function eq(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update |
|
| 123 | + public function eq(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update |
|
| 124 | 124 | { |
| 125 | 125 | return $this->is($value, $isColumn); |
| 126 | 126 | } |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | * @param bool $isColumn |
| 131 | 131 | * @return WhereStatement|Select|Delete|Update |
| 132 | 132 | */ |
| 133 | - public function isNot(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update |
|
| 133 | + public function isNot(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update |
|
| 134 | 134 | { |
| 135 | 135 | return $this->addCondition($value, '!=', $isColumn); |
| 136 | 136 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | * @param bool $isColumn |
| 141 | 141 | * @return WhereStatement|Select|Delete|Update |
| 142 | 142 | */ |
| 143 | - public function neq(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update |
|
| 143 | + public function neq(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update |
|
| 144 | 144 | { |
| 145 | 145 | return $this->isNot($value, $isColumn); |
| 146 | 146 | } |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * @param bool $isColumn |
| 151 | 151 | * @return WhereStatement|Select|Delete|Update |
| 152 | 152 | */ |
| 153 | - public function lt(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update |
|
| 153 | + public function lt(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update |
|
| 154 | 154 | { |
| 155 | 155 | return $this->addCondition($value, '<', $isColumn); |
| 156 | 156 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @param bool $isColumn |
| 161 | 161 | * @return WhereStatement|Select|Delete|Update |
| 162 | 162 | */ |
| 163 | - public function gt(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update |
|
| 163 | + public function gt(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update |
|
| 164 | 164 | { |
| 165 | 165 | return $this->addCondition($value, '>', $isColumn); |
| 166 | 166 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | * @param bool $isColumn |
| 171 | 171 | * @return WhereStatement|Select|Delete|Update |
| 172 | 172 | */ |
| 173 | - public function lte(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update |
|
| 173 | + public function lte(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update |
|
| 174 | 174 | { |
| 175 | 175 | return $this->addCondition($value, '<=', $isColumn); |
| 176 | 176 | } |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | * @param bool $isColumn |
| 181 | 181 | * @return WhereStatement|Select|Delete|Update |
| 182 | 182 | */ |
| 183 | - public function gte(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update |
|
| 183 | + public function gte(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update |
|
| 184 | 184 | { |
| 185 | 185 | return $this->addCondition($value, '>=', $isColumn); |
| 186 | 186 | } |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | * @param mixed $value2 |
| 191 | 191 | * @return WhereStatement|Select|Delete|Update |
| 192 | 192 | */ |
| 193 | - public function between(mixed $value1, mixed $value2): WhereStatement|Select|Delete|Update |
|
| 193 | + public function between(mixed $value1, mixed $value2): WhereStatement | Select | Delete | Update |
|
| 194 | 194 | { |
| 195 | 195 | return $this->addBetweenCondition($value1, $value2, false); |
| 196 | 196 | } |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | * @param mixed $value2 |
| 201 | 201 | * @return WhereStatement|Select|Delete|Update |
| 202 | 202 | */ |
| 203 | - public function notBetween(mixed $value1, mixed $value2): WhereStatement|Select|Delete|Update |
|
| 203 | + public function notBetween(mixed $value1, mixed $value2): WhereStatement | Select | Delete | Update |
|
| 204 | 204 | { |
| 205 | 205 | return $this->addBetweenCondition($value1, $value2, true); |
| 206 | 206 | } |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | * @param mixed $value |
| 210 | 210 | * @return WhereStatement|Select|Delete|Update |
| 211 | 211 | */ |
| 212 | - public function like(mixed $value): WhereStatement|Select|Delete|Update |
|
| 212 | + public function like(mixed $value): WhereStatement | Select | Delete | Update |
|
| 213 | 213 | { |
| 214 | 214 | return $this->addLikeCondition($value, false); |
| 215 | 215 | } |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | * @param mixed $value |
| 219 | 219 | * @return WhereStatement|Select|Delete|Update |
| 220 | 220 | */ |
| 221 | - public function notLike(mixed $value): WhereStatement|Select|Delete|Update |
|
| 221 | + public function notLike(mixed $value): WhereStatement | Select | Delete | Update |
|
| 222 | 222 | { |
| 223 | 223 | return $this->addLikeCondition($value, true); |
| 224 | 224 | } |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | * @param array<int, mixed>|Closure $value |
| 228 | 228 | * @return WhereStatement |
| 229 | 229 | */ |
| 230 | - public function in(array|Closure $value): WhereStatement |
|
| 230 | + public function in(array | Closure $value): WhereStatement |
|
| 231 | 231 | { |
| 232 | 232 | return $this->addInCondition($value, false); |
| 233 | 233 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | * @param array<int, mixed>|Closure $value |
| 237 | 237 | * @return WhereStatement |
| 238 | 238 | */ |
| 239 | - public function notIn(array|Closure $value): WhereStatement |
|
| 239 | + public function notIn(array | Closure $value): WhereStatement |
|
| 240 | 240 | { |
| 241 | 241 | return $this->addInCondition($value, true); |
| 242 | 242 | } |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | /** |
| 245 | 245 | * @return WhereStatement|Select|Delete|Update |
| 246 | 246 | */ |
| 247 | - public function isNull(): WhereStatement|Select|Delete|Update |
|
| 247 | + public function isNull(): WhereStatement | Select | Delete | Update |
|
| 248 | 248 | { |
| 249 | 249 | return $this->addNullCondition(false); |
| 250 | 250 | } |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | /** |
| 253 | 253 | * @return WhereStatement|Select|Delete|Update |
| 254 | 254 | */ |
| 255 | - public function isNotNull(): WhereStatement|Select|Delete|Update |
|
| 255 | + public function isNotNull(): WhereStatement | Select | Delete | Update |
|
| 256 | 256 | { |
| 257 | 257 | return $this->addNullCondition(true); |
| 258 | 258 | } |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | /** |
| 261 | 261 | * @return WhereStatement|Select|Delete|Update |
| 262 | 262 | */ |
| 263 | - public function nop(): WhereStatement|Select|Delete|Update |
|
| 263 | + public function nop(): WhereStatement | Select | Delete | Update |
|
| 264 | 264 | { |
| 265 | 265 | $this->queryStatement->addWhereNop($this->column, $this->separator); |
| 266 | 266 | |
@@ -289,9 +289,9 @@ discard block |
||
| 289 | 289 | mixed $value, |
| 290 | 290 | string $operator, |
| 291 | 291 | bool $isColumn = false |
| 292 | - ): WhereStatement|Select|Delete|Update { |
|
| 292 | + ): WhereStatement | Select | Delete | Update { |
|
| 293 | 293 | if ($isColumn && is_string($value)) { |
| 294 | - $value = function (Expression $expr) use ($value) { |
|
| 294 | + $value = function(Expression $expr) use ($value) { |
|
| 295 | 295 | return $expr->column($value); |
| 296 | 296 | }; |
| 297 | 297 | } |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | mixed $value1, |
| 316 | 316 | mixed $value2, |
| 317 | 317 | bool $not |
| 318 | - ): WhereStatement|Select|Delete|update { |
|
| 318 | + ): WhereStatement | Select | Delete | update { |
|
| 319 | 319 | $this->queryStatement->addWhereBetween( |
| 320 | 320 | $this->column, |
| 321 | 321 | $value1, |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | * @param bool $not |
| 333 | 333 | * @return WhereStatement|Select|Delete|update |
| 334 | 334 | */ |
| 335 | - protected function addLikeCondition(string $pattern, bool $not): WhereStatement|Select|Delete|update |
|
| 335 | + protected function addLikeCondition(string $pattern, bool $not): WhereStatement | Select | Delete | update |
|
| 336 | 336 | { |
| 337 | 337 | $this->queryStatement->addWhereLike( |
| 338 | 338 | $this->column, |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | * @param bool $not |
| 350 | 350 | * @return WhereStatement|Select|Delete|update |
| 351 | 351 | */ |
| 352 | - protected function addInCondition(mixed $value, bool $not): WhereStatement|Select|Delete|update |
|
| 352 | + protected function addInCondition(mixed $value, bool $not): WhereStatement | Select | Delete | update |
|
| 353 | 353 | { |
| 354 | 354 | $this->queryStatement->addWhereIn( |
| 355 | 355 | $this->column, |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | * @param bool $not |
| 366 | 366 | * @return WhereStatement|Select|Delete|Update |
| 367 | 367 | */ |
| 368 | - protected function addNullCondition(bool $not): WhereStatement|Select|Delete|Update |
|
| 368 | + protected function addNullCondition(bool $not): WhereStatement | Select | Delete | Update |
|
| 369 | 369 | { |
| 370 | 370 | $this->queryStatement->addWhereNull( |
| 371 | 371 | $this->column, |
@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | * @return WhereStatement|Where|Select|Delete|Update |
| 92 | 92 | */ |
| 93 | 93 | public function where( |
| 94 | - string|Expression|Closure $column, |
|
| 94 | + string | Expression | Closure $column, |
|
| 95 | 95 | bool $isExpression = false |
| 96 | - ): WhereStatement|Where|Select|Delete|Update { |
|
| 96 | + ): WhereStatement | Where | Select | Delete | Update { |
|
| 97 | 97 | return $this->addWhereCondition($column, 'AND', $isExpression); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | * @return WhereStatement|Where|Select|Delete|Update |
| 105 | 105 | */ |
| 106 | 106 | public function orWhere( |
| 107 | - string|Expression|Closure $column, |
|
| 107 | + string | Expression | Closure $column, |
|
| 108 | 108 | bool $isExpression = false |
| 109 | - ): WhereStatement|Where|Select|Delete|Update { |
|
| 109 | + ): WhereStatement | Where | Select | Delete | Update { |
|
| 110 | 110 | return $this->addWhereCondition($column, 'OR', $isExpression); |
| 111 | 111 | } |
| 112 | 112 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * @param Closure $select |
| 115 | 115 | * @return WhereStatement|Select|Delete|Update |
| 116 | 116 | */ |
| 117 | - public function whereExists(Closure $select): WhereStatement|Select|Delete|Update |
|
| 117 | + public function whereExists(Closure $select): WhereStatement | Select | Delete | Update |
|
| 118 | 118 | { |
| 119 | 119 | return $this->addWhereExistsCondition($select, 'AND', false); |
| 120 | 120 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | * @param Closure $select |
| 124 | 124 | * @return WhereStatement|Select|Delete|Update |
| 125 | 125 | */ |
| 126 | - public function orWhereExists(Closure $select): WhereStatement|Select|Delete|Update |
|
| 126 | + public function orWhereExists(Closure $select): WhereStatement | Select | Delete | Update |
|
| 127 | 127 | { |
| 128 | 128 | return $this->addWhereExistsCondition($select, 'OR', false); |
| 129 | 129 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * @param Closure $select |
| 133 | 133 | * @return WhereStatement|Select|Delete|Update |
| 134 | 134 | */ |
| 135 | - public function whereNotExists(Closure $select): WhereStatement|Select|Delete|Update |
|
| 135 | + public function whereNotExists(Closure $select): WhereStatement | Select | Delete | Update |
|
| 136 | 136 | { |
| 137 | 137 | return $this->addWhereExistsCondition($select, 'AND', true); |
| 138 | 138 | } |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | * @param Closure $select |
| 142 | 142 | * @return WhereStatement|Select|Delete|Update |
| 143 | 143 | */ |
| 144 | - public function orWhereNotExists(Closure $select): WhereStatement|Select|Delete|Update |
|
| 144 | + public function orWhereNotExists(Closure $select): WhereStatement | Select | Delete | Update |
|
| 145 | 145 | { |
| 146 | 146 | return $this->addWhereExistsCondition($select, 'OR', true); |
| 147 | 147 | } |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | mixed $column, |
| 167 | 167 | string $separator = 'AND', |
| 168 | 168 | bool $isExpression = false |
| 169 | - ): WhereStatement|Where { |
|
| 169 | + ): WhereStatement | Where { |
|
| 170 | 170 | if (($column instanceof Closure) && $isExpression === false) { |
| 171 | 171 | $this->queryStatement->addWhereGroup($column, $separator); |
| 172 | 172 | |