Skip to content

Commit 45c3a43

Browse files
authored
Fix psalm (#404)
1 parent 761ee7a commit 45c3a43

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
- Enh #393: Refactor according changes in `db` package (@Tigrov)
3838
- New #391: Add `caseSensitive` option to like condition (@vjik)
3939
- Enh #396: Remove `getCacheKey()` and `getCacheTag()` methods from `Schema` class (@Tigrov)
40-
- Enh #403: Use `DbArrayHelper::arrange()` instead of `DbArrayHelper::index()` method (@Tigrov)
40+
- Enh #403, #404: Use `DbArrayHelper::arrange()` instead of `DbArrayHelper::index()` method (@Tigrov)
4141

4242
## 1.3.0 March 21, 2024
4343

src/Schema.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -301,15 +301,13 @@ protected function loadTableIndexes(string $tableName): array
301301
':tableName' => $resolvedName->getName(),
302302
])->queryAll();
303303

304-
/** @psalm-var array[] $indexes */
305304
$indexes = array_map(array_change_key_case(...), $indexes);
306305
$indexes = DbArrayHelper::arrange($indexes, ['name']);
307306
$result = [];
308307

309308
/**
310-
* @psalm-var object|string|null $name
311-
* @psalm-var array<
312-
* array-key,
309+
* @var string $name
310+
* @psalm-var list<
313311
* array{
314312
* name: string,
315313
* column_name: string,
@@ -841,7 +839,6 @@ private function loadTableConstraints(string $tableName, string $returnType): ar
841839
':tableName' => $resolvedName->getName(),
842840
])->queryAll();
843841

844-
/** @psalm-var array[][] $constraints */
845842
$constraints = array_map(array_change_key_case(...), $constraints);
846843
$constraints = DbArrayHelper::arrange($constraints, ['type', 'name']);
847844

@@ -852,10 +849,6 @@ private function loadTableConstraints(string $tableName, string $returnType): ar
852849
self::CHECKS => [],
853850
];
854851

855-
/**
856-
* @psalm-var string $type
857-
* @psalm-var array $names
858-
*/
859852
foreach ($constraints as $type => $names) {
860853
/**
861854
* @psalm-var object|string|null $name

0 commit comments

Comments
 (0)