diff --git a/psalm.xml b/psalm.xml index 23bfcce..54a52e1 100644 --- a/psalm.xml +++ b/psalm.xml @@ -14,4 +14,7 @@ + + + diff --git a/src/DMLQueryBuilder.php b/src/DMLQueryBuilder.php index 4047a17..ae03ccc 100644 --- a/src/DMLQueryBuilder.php +++ b/src/DMLQueryBuilder.php @@ -24,8 +24,6 @@ final class DMLQueryBuilder extends AbstractDMLQueryBuilder { /** - * @psalm-suppress MixedArrayOffset - * * @throws Exception * @throws InvalidArgumentException * @throws InvalidConfigException @@ -41,14 +39,12 @@ public function batchInsert(string $table, array $columns, iterable $rows, array $columns = $this->getNormalizeColumnNames('', $columns); $columnSchemas = $this->schema->getTableSchema($table)?->getColumns() ?? []; - /** @psalm-var array[] $rows */ foreach ($rows as $row) { $i = 0; $placeholders = []; - /** @psalm-var mixed $value */ + foreach ($row as $value) { if (isset($columns[$i], $columnSchemas[$columns[$i]])) { - /** @psalm-var mixed $value */ $value = $columnSchemas[$columns[$i]]->dbTypecast($value); }