Skip to content

Commit

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

namespace Yiisoft\Db\QueryBuilder;

use Generator;
use Yiisoft\Db\Command\CommandInterface;
use Yiisoft\Db\Expression\ExpressionInterface;
use Yiisoft\Db\Query\QueryInterface;
Expand Down Expand Up @@ -109,7 +108,7 @@ public function alterColumn(string $table, string $column, ColumnInterface|strin
return $this->ddlBuilder->alterColumn($table, $column, $type);
}

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
{
return $this->dmlBuilder->batchInsert($table, $columns, $rows, $params);
}
Expand Down
3 changes: 1 addition & 2 deletions tests/AbstractQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Yiisoft\Db\Tests;

use Closure;
use Generator;
use JsonException;
use PHPUnit\Framework\TestCase;
use stdClass;
Expand Down Expand Up @@ -211,7 +210,7 @@ public function testAlterColumn(): void
*
* @psalm-param array<array-key, string> $columns
*/
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
{
$db = $this->getConnection();
Expand Down
3 changes: 1 addition & 2 deletions tests/Db/QueryBuilder/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Yiisoft\Db\Tests\Db\QueryBuilder;

use Generator;
use JsonException;
use Yiisoft\Db\Exception\Exception;
use Yiisoft\Db\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -48,7 +47,7 @@ public function testAddDefaultValue(): void
/**
* @dataProvider \Yiisoft\Db\Tests\Provider\QueryBuilderProvider::batchInsert
*/
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
{
$db = $this->getConnection();

Expand Down

0 comments on commit 70cd177

Please sign in to comment.