Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Jul 17, 2024
1 parent 9cb2a9b commit b8156b5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/DatabasePopulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,15 @@ private function insertRows(string $table, array $rows): void
}

foreach ($requests as $request) {
$columns = array_map(static fn ($c) => "`$c`", $request['columns']);
$sql = 'INSERT INTO ' . $table . ' (' . implode(',', $columns) . ') VALUES ';
$columns = array_map(
fn($c) => $this->dbDriver->getQuotedName($c),

Check failure on line 79 in src/DatabasePopulator.php

View workflow job for this annotation

GitHub Actions / PHP 8.0-ubuntu-latest

MixedArgumentTypeCoercion: Argument 1 of Codeception\Lib\Driver\Db::getQuotedName expects string, but parent type array-key provided

Check failure on line 79 in src/DatabasePopulator.php

View workflow job for this annotation

GitHub Actions / PHP 8.1-ubuntu-latest

MixedArgumentTypeCoercion: Argument 1 of Codeception\Lib\Driver\Db::getQuotedName expects string, but parent type array-key provided
$request['columns']
);
$sql = sprintf(
'INSERT INTO %s (%s) VALUES ',
$this->dbDriver->getQuotedName($table),
implode(',', $columns),
);

$insertQuery = [];
$insertData = [];
Expand Down

0 comments on commit b8156b5

Please sign in to comment.