Skip to content

Commit 2d69cf1

Browse files
authored
Call DbArrayHelper::arrange() instead of DbArrayHelper::index() (#318)
1 parent 6357713 commit 2d69cf1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
- Enh #313: Refactor according changes in `db` package (@Tigrov)
4242
- New #311: Add `caseSensitive` option to like condition (@vjik)
4343
- Enh #315: Remove `getCacheKey()` and `getCacheTag()` methods from `Schema` class (@Tigrov)
44+
- Enh #318: Use `DbArrayHelper::arrange()` instead of `DbArrayHelper::index()` method (@Tigrov)
4445

4546
## 1.3.0 March 21, 2024
4647

src/Schema.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ protected function loadTableIndexes(string $tableName): array
248248

249249
/** @psalm-var array[] $indexes */
250250
$indexes = array_map(array_change_key_case(...), $indexes);
251-
$indexes = DbArrayHelper::index($indexes, null, ['name']);
251+
$indexes = DbArrayHelper::arrange($indexes, ['name']);
252252

253253
$result = [];
254254

@@ -657,7 +657,7 @@ private function loadTableConstraints(string $tableName, string $returnType): mi
657657

658658
/** @psalm-var array[] $constraints */
659659
$constraints = array_map(array_change_key_case(...), $constraints);
660-
$constraints = DbArrayHelper::index($constraints, null, ['type', 'name']);
660+
$constraints = DbArrayHelper::arrange($constraints, ['type', 'name']);
661661

662662
$result = [
663663
self::PRIMARY_KEY => null,

0 commit comments

Comments
 (0)