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);