From 79b9bb70f7ed7a1d21bf854d42dd6b81d9d98379 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Sat, 4 Nov 2023 14:18:15 +0700 Subject: [PATCH] Fix psalm --- src/QueryBuilder/AbstractDMLQueryBuilder.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/QueryBuilder/AbstractDMLQueryBuilder.php b/src/QueryBuilder/AbstractDMLQueryBuilder.php index d007d033d..5d57d6412 100644 --- a/src/QueryBuilder/AbstractDMLQueryBuilder.php +++ b/src/QueryBuilder/AbstractDMLQueryBuilder.php @@ -67,11 +67,10 @@ public function batchInsert(string $table, array $columns, iterable $rows, array $placeholders = $columnKeys; foreach ($row as $key => $value) { - /** @psalm-var string|int $columnName */ + /** @psalm-suppress MixedArrayTypeCoercion */ $columnName = $columns[$key] ?? (isset($columnKeys[$key]) ? $key : $columnNames[$i] ?? $i); - + /** @psalm-suppress MixedArrayTypeCoercion */ if (isset($columnSchemas[$columnName])) { - /** @psalm-var mixed $value */ $value = $columnSchemas[$columnName]->dbTypecast($value); }