Skip to content

Commit

Permalink
Fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Nov 4, 2023
1 parent 2fbfc10 commit 79b9bb7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/QueryBuilder/AbstractDMLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 74 in src/QueryBuilder/AbstractDMLQueryBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/QueryBuilder/AbstractDMLQueryBuilder.php#L74

Added line #L74 was not covered by tests
}

Expand Down

0 comments on commit 79b9bb7

Please sign in to comment.