33
33
34
34
use function array_change_key_case ;
35
35
use function array_map ;
36
- use function array_merge ;
37
36
use function array_unique ;
38
37
use function array_values ;
39
38
use function explode ;
@@ -408,7 +407,7 @@ protected function loadTableIndexes(string $tableName): array
408
407
])->queryAll ();
409
408
410
409
/** @psalm-var array[] $indexes */
411
- $ indexes = array_map (' array_change_key_case ' , $ indexes );
410
+ $ indexes = array_map (array_change_key_case (...) , $ indexes );
412
411
$ indexes = DbArrayHelper::index ($ indexes , null , ['name ' ]);
413
412
$ result = [];
414
413
@@ -593,7 +592,7 @@ protected function findConstraints(TableSchemaInterface $table): void
593
592
foreach ($ constraints as $ foreingKeyName => $ constraint ) {
594
593
$ table ->foreignKey (
595
594
(string ) $ foreingKeyName ,
596
- array_merge ( [$ constraint ['tableName ' ]], $ constraint ['columns ' ])
595
+ [$ constraint ['tableName ' ], ... $ constraint ['columns ' ]]
597
596
);
598
597
}
599
598
}
@@ -1001,7 +1000,7 @@ private function loadTableConstraints(string $tableName, string $returnType): ar
1001
1000
])->queryAll ();
1002
1001
1003
1002
/** @psalm-var array[][] $constraints */
1004
- $ constraints = array_map (' array_change_key_case ' , $ constraints );
1003
+ $ constraints = array_map (array_change_key_case (...) , $ constraints );
1005
1004
$ constraints = DbArrayHelper::index ($ constraints , null , ['type ' , 'name ' ]);
1006
1005
1007
1006
$ result = [
@@ -1101,12 +1100,10 @@ protected function createColumnSchema(string $type, mixed ...$info): ColumnSchem
1101
1100
* @param string $name The table name.
1102
1101
*
1103
1102
* @return array The cache key.
1104
- *
1105
- * @psalm-suppress DeprecatedMethod
1106
1103
*/
1107
1104
protected function getCacheKey (string $ name ): array
1108
1105
{
1109
- return array_merge ( [self ::class], $ this ->generateCacheKey (), [ $ this ->db ->getQuoter ()->getRawTableName ($ name )]) ;
1106
+ return [self ::class, ... $ this ->generateCacheKey (), $ this ->db ->getQuoter ()->getRawTableName ($ name )];
1110
1107
}
1111
1108
1112
1109
/**
@@ -1118,6 +1115,6 @@ protected function getCacheKey(string $name): array
1118
1115
*/
1119
1116
protected function getCacheTag (): string
1120
1117
{
1121
- return md5 (serialize (array_merge ( [self ::class], $ this ->generateCacheKey ()) ));
1118
+ return md5 (serialize ([self ::class, ... $ this ->generateCacheKey ()] ));
1122
1119
}
1123
1120
}
0 commit comments