Skip to content

Commit

Permalink
Fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed May 5, 2024
1 parent 9341cb8 commit d2afd28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DMLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function insertWithReturningPks(string $table, QueryInterface|array $colu
$insertedCols = [];
$returnColumns = array_intersect_key($tableSchema?->getColumns() ?? [], array_flip($primaryKeys));

foreach ($returnColumns as $returnColumn) {
foreach ($returnColumns as $columnName => $returnColumn) {
$dbType = $returnColumn->getDbType();

if (in_array($dbType, ['char', 'varchar', 'nchar', 'nvarchar', 'binary', 'varbinary'], true)) {
Expand All @@ -52,7 +52,7 @@ public function insertWithReturningPks(string $table, QueryInterface|array $colu
$dbType = $returnColumn->isAllowNull() ? 'varbinary(8)' : 'binary(8)';
}

$quotedName = $this->quoter->quoteColumnName($returnColumn->getName());
$quotedName = $this->quoter->quoteColumnName($columnName);
$createdCols[] = $quotedName . ' ' . (string) $dbType . ' ' . ($returnColumn->isAllowNull() ? 'NULL' : '');
$insertedCols[] = 'INSERTED.' . $quotedName;
}
Expand Down

0 comments on commit d2afd28

Please sign in to comment.