Skip to content

Commit

Permalink
Fix psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Apr 14, 2024
1 parent 07e1a8d commit b9ff4ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/QueryBuilder/AbstractDMLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ public function upsert(
* @param Traversable $rows The rows to be batch inserted into the table.
*
* @return array|Iterator The prepared rows.
*
* @psalm-return Iterator|array<iterable<array-key, mixed>>
*/
protected function prepareTraversable(Traversable $rows): Iterator|array
{
Expand All @@ -153,6 +155,7 @@ protected function prepareTraversable(Traversable $rows): Iterator|array
return [];
}

/** @var Iterator $rows */
return $rows;
}

Expand Down Expand Up @@ -210,6 +213,8 @@ protected function prepareBatchInsertValues(string $table, iterable $rows, array
* @param string[] $columns The column names.
*
* @return string[] The column names.
*
* @psalm-param Iterator|non-empty-array<iterable<array-key, mixed>> $rows
*/
protected function extractColumnNames(array|Iterator $rows, array $columns): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/QueryBuilder/DMLQueryBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface DMLQueryBuilderInterface
* @return string The batch INSERT SQL statement.
*
* @psalm-param string[] $columns
* @psalm-param iterable<array-key, array<array-key, mixed>> $rows
* @psalm-param iterable<iterable<array-key, mixed>> $rows
* @psalm-param ParamsType $params
*
* Note:
Expand Down

0 comments on commit b9ff4ba

Please sign in to comment.