From 9fe6843c7bdc1fa60ec817af717abec47162516b Mon Sep 17 00:00:00 2001 From: Tigrov Date: Tue, 31 Oct 2023 15:46:34 +0700 Subject: [PATCH] Update psalm --- psalm.xml | 3 +++ src/DMLQueryBuilder.php | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) 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); }