Skip to content

Commit

Permalink
Remove Generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Oct 31, 2023
1 parent b8fa78a commit 3ee30e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/DMLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Yiisoft\Db\Oracle;

use Generator;
use JsonException;
use Yiisoft\Db\Exception\Exception;
use Yiisoft\Db\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -32,14 +31,14 @@ final class DMLQueryBuilder extends AbstractDMLQueryBuilder
* @throws InvalidConfigException
* @throws NotSupportedException
*/
public function batchInsert(string $table, array $columns, iterable|Generator $rows, array &$params = []): string
public function batchInsert(string $table, array $columns, iterable $rows, array &$params = []): string
{
if (empty($rows)) {
return '';
}

$values = [];
$columns = $this->getNormalizeColumnNames($columns);
$columns = $this->getNormalizeColumnNames('', $columns);
$columnSchemas = $this->schema->getTableSchema($table)?->getColumns() ?? [];

/** @psalm-var array[] $rows */
Expand Down
3 changes: 1 addition & 2 deletions tests/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Yiisoft\Db\Oracle\Tests;

use Generator;
use Throwable;
use Yiisoft\Db\Exception\Exception;
use Yiisoft\Db\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -125,7 +124,7 @@ public function testAlterColumn(): void
* @throws InvalidArgumentException
* @throws NotSupportedException
*/
public function testBatchInsert(string $table, array $columns, iterable|Generator $rows, string $expected): void
public function testBatchInsert(string $table, array $columns, iterable $rows, string $expected): void
{
parent::testBatchInsert($table, $columns, $rows, $expected);
}
Expand Down

0 comments on commit 3ee30e3

Please sign in to comment.