From 2fbfc10fd462cdf98190b90cf3d1dfad20957f33 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Sat, 4 Nov 2023 14:08:04 +0700 Subject: [PATCH] Remove old comments --- CHANGELOG.md | 1 - src/QueryBuilder/AbstractDMLQueryBuilder.php | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2055c1a18..34e983ff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,6 @@ ## 1.1.2 under development -- Bug #746: Refactor `DMLQueryBuilder` and fix: unique indexes in `upsert()`, column names with table name and brackets, `batchInsert()` with associative arrays, enhanced documentation of `batchInsert()` and `update()` (@Tigrov) - Enh #746: Refactor `AbstractDMLQueryBuilder` (@Tigrov) - Bug #746: Fix `AbstractDMLQueryBuilder::upsert()` when unique index is not at the first position of inserted values (@Tigrov) - Bug #746: Typecast values in `AbstractDMLQueryBuilder::batchInsert()` if column names with table name and brackets (@Tigrov) diff --git a/src/QueryBuilder/AbstractDMLQueryBuilder.php b/src/QueryBuilder/AbstractDMLQueryBuilder.php index b29d08efd..d007d033d 100644 --- a/src/QueryBuilder/AbstractDMLQueryBuilder.php +++ b/src/QueryBuilder/AbstractDMLQueryBuilder.php @@ -65,10 +65,7 @@ public function batchInsert(string $table, array $columns, iterable $rows, array foreach ($rows as $row) { $i = 0; $placeholders = $columnKeys; - /** - * @psalm-var string|int $key - * @psalm-var mixed $value - */ + foreach ($row as $key => $value) { /** @psalm-var string|int $columnName */ $columnName = $columns[$key] ?? (isset($columnKeys[$key]) ? $key : $columnNames[$i] ?? $i);