@@ -48,7 +48,7 @@ |
||
| 48 | 48 | * $insert->columns("name", "email"); |
| 49 | 49 | * $insert->columns("name, email"); |
| 50 | 50 | */ |
| 51 | - public function columns(array|string ...$columns): InsertQuery |
|
| 51 | + public function columns(array | string ...$columns): InsertQuery |
|
| 52 | 52 | { |
| 53 | 53 | $this->columns = $this->fetchIdentifiers($columns); |
| 54 | 54 | |
@@ -236,8 +236,8 @@ |
||
| 236 | 236 | */ |
| 237 | 237 | protected function formatDatetime( |
| 238 | 238 | string $type, |
| 239 | - string|int|\DateTimeInterface $value |
|
| 240 | - ): \DateTimeInterface|FragmentInterface|string { |
|
| 239 | + string | int | \DateTimeInterface $value |
|
| 240 | + ): \DateTimeInterface | FragmentInterface | string { |
|
| 241 | 241 | if ($value === 'current_timestamp()') { |
| 242 | 242 | $value = self::DATETIME_NOW; |
| 243 | 243 | } |
@@ -228,7 +228,7 @@ |
||
| 228 | 228 | * |
| 229 | 229 | * @psalm-return non-empty-string |
| 230 | 230 | */ |
| 231 | - protected function identify(AbstractTable|ElementInterface|string $element): string |
|
| 231 | + protected function identify(AbstractTable | ElementInterface | string $element): string |
|
| 232 | 232 | { |
| 233 | 233 | if (\is_string($element)) { |
| 234 | 234 | return $this->driver->identifier($element); |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | ); |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - protected function distinct(QueryParameters $params, Quoter $q, string|bool|array $distinct): string |
|
| 189 | + protected function distinct(QueryParameters $params, Quoter $q, string | bool | array $distinct): string |
|
| 190 | 190 | { |
| 191 | 191 | return $distinct === false ? '' : 'DISTINCT'; |
| 192 | 192 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | { |
| 259 | 259 | $result = []; |
| 260 | 260 | foreach ($groupBy as $identifier) { |
| 261 | - $result[] = $this->name($params, $q, $identifier); |
|
| 261 | + $result[] = $this->name($params, $q, $identifier); |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | return implode(', ', $result); |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | { |
| 335 | 335 | // let's quote every identifier |
| 336 | 336 | $columns = array_map( |
| 337 | - function ($column) use ($params, $q) { |
|
| 337 | + function($column) use ($params, $q) { |
|
| 338 | 338 | return $this->name($params, $q, $column); |
| 339 | 339 | }, |
| 340 | 340 | $columns |
@@ -322,7 +322,7 @@ |
||
| 322 | 322 | { |
| 323 | 323 | $defaultValue = parent::quoteDefault($driver); |
| 324 | 324 | if ($this->getAbstractType() === 'boolean') { |
| 325 | - $defaultValue = (string) ((int)$this->defaultValue); |
|
| 325 | + $defaultValue = (string)((int)$this->defaultValue); |
|
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | return $defaultValue; |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | foreach ($schema as $indexColumn) { |
| 28 | 28 | $index->columns[] = $indexColumn['columnName']; |
| 29 | - if ((int) $indexColumn['isDescendingKey'] === 1) { |
|
| 29 | + if ((int)$indexColumn['isDescendingKey'] === 1) { |
|
| 30 | 30 | $index->sort[$indexColumn['columnName']] = 'DESC'; |
| 31 | 31 | } |
| 32 | 32 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | ); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - protected function distinct(QueryParameters $params, Quoter $q, string|bool|array $distinct): string |
|
| 43 | + protected function distinct(QueryParameters $params, Quoter $q, string | bool | array $distinct): string |
|
| 44 | 44 | { |
| 45 | 45 | if ($distinct === false) { |
| 46 | 46 | return ''; |
@@ -162,7 +162,7 @@ |
||
| 162 | 162 | return $this->type('bigPrimary'); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - public function enum(string|array $values): AbstractColumn |
|
| 165 | + public function enum(string | array $values): AbstractColumn |
|
| 166 | 166 | { |
| 167 | 167 | $this->enumValues = array_map('strval', \is_array($values) ? $values : \func_get_args()); |
| 168 | 168 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * Apply distinct ON to the query. |
| 21 | 21 | */ |
| 22 | - public function distinctOn(FragmentInterface|string $distinctOn): SelectQuery |
|
| 22 | + public function distinctOn(FragmentInterface | string $distinctOn): SelectQuery |
|
| 23 | 23 | { |
| 24 | 24 | $this->distinct = ['on' => $distinctOn]; |
| 25 | 25 | |