@@ -107,7 +107,7 @@ |
||
| 107 | 107 | return (object) []; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - public function first(): string|int|float|null |
|
| 110 | + public function first(): string | int | float | null |
|
| 111 | 111 | { |
| 112 | 112 | return 0; |
| 113 | 113 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * |
| 75 | 75 | * @return TValue|null |
| 76 | 76 | */ |
| 77 | - public function first(Closure|null $closure = null): mixed |
|
| 77 | + public function first(Closure | null $closure = null): mixed |
|
| 78 | 78 | { |
| 79 | 79 | foreach ($this->getArrayCopy() as $value) { |
| 80 | 80 | if ($closure === null || $closure($value)) { |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @return TValue|null |
| 92 | 92 | */ |
| 93 | - public function last(Closure|null $closure = null): mixed |
|
| 93 | + public function last(Closure | null $closure = null): mixed |
|
| 94 | 94 | { |
| 95 | 95 | return $this->reverse()->first(closure: $closure); |
| 96 | 96 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | ) { |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - public function pendingChangesExist(Tree|null $tree = null): bool |
|
| 61 | + public function pendingChangesExist(Tree | null $tree = null): bool |
|
| 62 | 62 | { |
| 63 | 63 | $query = DB::table(table: 'change')->where(column: 'status', operator: '=', value: 'pending'); |
| 64 | 64 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | use ModuleMapProviderTrait; |
| 40 | 40 | |
| 41 | 41 | // This list comes from https://image.maps.hereapi.com/mia/v3/languages?apiKey={YOUR_API_KEY} |
| 42 | - private const array LANGUAGE_CODES = ["ar","as","az","be","bg","bn","bs","ca","cs","cy","da","de","el","en","es","et","eu","fi","fo","fr","ga","gl","gn","gu","he","hi","hr","hu","hy","id","is","it","ja","ka","kk","km","kn","ko","ky","lt","lv","mk","ml","mr","ms","mt","my","nl","no","or","pa","pl","pt","ro","ru","sk","sl","sq","sr","sv","ta","te","th","tr","uk","uz","vi","zh","zh-Hant"]; |
|
| 42 | + private const array LANGUAGE_CODES = ["ar", "as", "az", "be", "bg", "bn", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "es", "et", "eu", "fi", "fo", "fr", "ga", "gl", "gn", "gu", "he", "hi", "hr", "hu", "hy", "id", "is", "it", "ja", "ka", "kk", "km", "kn", "ko", "ky", "lt", "lv", "mk", "ml", "mr", "ms", "mt", "my", "nl", "no", "or", "pa", "pl", "pt", "ro", "ru", "sk", "sl", "sq", "sr", "sv", "ta", "te", "th", "tr", "uk", "uz", "vi", "zh", "zh-Hant"]; |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * Name of the map provider. |
@@ -49,33 +49,33 @@ |
||
| 49 | 49 | */ |
| 50 | 50 | public function __construct( |
| 51 | 51 | public string $name, |
| 52 | - Column|Index|ForeignKeyConstraint|PrimaryKeyConstraint ...$components, |
|
| 52 | + Column | Index | ForeignKeyConstraint | PrimaryKeyConstraint ...$components, |
|
| 53 | 53 | ) { |
| 54 | 54 | $this->columns = array_values( |
| 55 | 55 | array: array_filter( |
| 56 | 56 | array: $components, |
| 57 | - callback: static fn (Column|Index|ForeignKeyConstraint|PrimaryKeyConstraint $component): bool => $component instanceof Column, |
|
| 57 | + callback: static fn (Column | Index | ForeignKeyConstraint | PrimaryKeyConstraint $component): bool => $component instanceof Column, |
|
| 58 | 58 | ) |
| 59 | 59 | ); |
| 60 | 60 | |
| 61 | 61 | $this->primary_keys = array_values( |
| 62 | 62 | array: array_filter( |
| 63 | 63 | array: $components, |
| 64 | - callback: static fn (Column|Index|ForeignKeyConstraint|PrimaryKeyConstraint $component): bool => $component instanceof PrimaryKeyConstraint, |
|
| 64 | + callback: static fn (Column | Index | ForeignKeyConstraint | PrimaryKeyConstraint $component): bool => $component instanceof PrimaryKeyConstraint, |
|
| 65 | 65 | ) |
| 66 | 66 | ); |
| 67 | 67 | |
| 68 | 68 | $this->indexes = array_values( |
| 69 | 69 | array: array_filter( |
| 70 | 70 | array: $components, |
| 71 | - callback: static fn (Column|Index|ForeignKeyConstraint|PrimaryKeyConstraint $component): bool => $component instanceof Index, |
|
| 71 | + callback: static fn (Column | Index | ForeignKeyConstraint | PrimaryKeyConstraint $component): bool => $component instanceof Index, |
|
| 72 | 72 | ) |
| 73 | 73 | ); |
| 74 | 74 | |
| 75 | 75 | $this->foreign_keys = array_values( |
| 76 | 76 | array: array_filter( |
| 77 | 77 | array: $components, |
| 78 | - callback: static fn (Column|Index|ForeignKeyConstraint|PrimaryKeyConstraint $component): bool => $component instanceof ForeignKeyConstraint, |
|
| 78 | + callback: static fn (Column | Index | ForeignKeyConstraint | PrimaryKeyConstraint $component): bool => $component instanceof ForeignKeyConstraint, |
|
| 79 | 79 | ) |
| 80 | 80 | ); |
| 81 | 81 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | * @param non-empty-string|null $alias |
| 33 | 33 | * |
| 34 | 34 | */ |
| 35 | - public function from(string $table, string|null $alias = null): self |
|
| 35 | + public function from(string $table, string | null $alias = null): self |
|
| 36 | 36 | { |
| 37 | 37 | return parent::from(table: DB::prefix($table), alias: $alias ?? $table); |
| 38 | 38 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | return self::pdo()->getAttribute(PDO::ATTR_DRIVER_NAME); |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | - public static function exec(string $sql): int|false |
|
| 215 | + public static function exec(string $sql): int | false |
|
| 216 | 216 | { |
| 217 | 217 | return self::pdo()->exec($sql); |
| 218 | 218 | } |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | /** |
| 305 | 305 | * @return Expression<string> |
| 306 | 306 | */ |
| 307 | - public static function binaryColumn(string $column, string|null $alias = null): Expression |
|
| 307 | + public static function binaryColumn(string $column, string | null $alias = null): Expression |
|
| 308 | 308 | { |
| 309 | 309 | if (self::driverName() === self::MYSQL) { |
| 310 | 310 | $sql = 'CAST(' . $column . ' AS binary)'; |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | /** |
| 371 | 371 | * @param non-empty-string $name |
| 372 | 372 | */ |
| 373 | - public static function char(string $name, int $length, bool $nullable = false, string|null $default = null): Column |
|
| 373 | + public static function char(string $name, int $length, bool $nullable = false, string | null $default = null): Column |
|
| 374 | 374 | { |
| 375 | 375 | return Column::editor() |
| 376 | 376 | ->setUnquotedName($name) |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | /** |
| 387 | 387 | * @param non-empty-string $name |
| 388 | 388 | */ |
| 389 | - public static function varchar(string $name, int $length, bool $nullable = false, string|null $default = null): Column |
|
| 389 | + public static function varchar(string $name, int $length, bool $nullable = false, string | null $default = null): Column |
|
| 390 | 390 | { |
| 391 | 391 | return Column::editor() |
| 392 | 392 | ->setUnquotedName($name) |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | /** |
| 403 | 403 | * @param non-empty-string $name |
| 404 | 404 | */ |
| 405 | - public static function nchar(string $name, int $length, bool $nullable = false, string|null $default = null): Column |
|
| 405 | + public static function nchar(string $name, int $length, bool $nullable = false, string | null $default = null): Column |
|
| 406 | 406 | { |
| 407 | 407 | return Column::editor() |
| 408 | 408 | ->setUnquotedName($name) |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | /** |
| 419 | 419 | * @param non-empty-string $name |
| 420 | 420 | */ |
| 421 | - public static function nvarchar(string $name, int $length, bool $nullable = false, string|null $default = null): Column |
|
| 421 | + public static function nvarchar(string $name, int $length, bool $nullable = false, string | null $default = null): Column |
|
| 422 | 422 | { |
| 423 | 423 | return Column::editor() |
| 424 | 424 | ->setUnquotedName($name) |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | /** |
| 435 | 435 | * @param non-empty-string $name |
| 436 | 436 | */ |
| 437 | - public static function integer(string $name, bool $autoincrement = false, bool $nullable = false, int|null $default = null): Column |
|
| 437 | + public static function integer(string $name, bool $autoincrement = false, bool $nullable = false, int | null $default = null): Column |
|
| 438 | 438 | { |
| 439 | 439 | return Column::editor() |
| 440 | 440 | ->setUnquotedName($name) |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | /** |
| 473 | 473 | * @param non-empty-string $name |
| 474 | 474 | */ |
| 475 | - public static function timestamp(string $name, int $precision = 0, string|null $default = null): Column |
|
| 475 | + public static function timestamp(string $name, int $precision = 0, string | null $default = null): Column |
|
| 476 | 476 | { |
| 477 | 477 | return Column::editor() |
| 478 | 478 | ->setUnquotedName($name) |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | string $name, |
| 528 | 528 | array $local_columns, |
| 529 | 529 | string $foreign_table, |
| 530 | - array|null $foreign_columns = null, |
|
| 530 | + array | null $foreign_columns = null, |
|
| 531 | 531 | ReferentialAction $on_delete = ReferentialAction::NO_ACTION, |
| 532 | 532 | ReferentialAction $on_update = ReferentialAction::NO_ACTION, |
| 533 | 533 | ): ForeignKeyConstraint { |