Skip to content

Commit

Permalink
Update psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Oct 31, 2023
1 parent 3ee30e3 commit 9fe6843
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 3 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MixedAssignment errorLevel="suppress" />
</issueHandlers>
</psalm>
6 changes: 1 addition & 5 deletions src/DMLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
final class DMLQueryBuilder extends AbstractDMLQueryBuilder
{
/**
* @psalm-suppress MixedArrayOffset
*
* @throws Exception
* @throws InvalidArgumentException
* @throws InvalidConfigException
Expand All @@ -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);
}

Expand Down

0 comments on commit 9fe6843

Please sign in to comment.