mirror of
https://github.com/danog/postgres.git
synced 2024-11-30 04:29:12 +01:00
Use array_combine() instead of manual iteration
This commit is contained in:
parent
237fbf413c
commit
f6b4f1a991
@ -94,12 +94,7 @@ final class PgSqlResultSet implements ResultSet
|
||||
$result[$column] = $this->cast($column, $result[$column]);
|
||||
}
|
||||
|
||||
$assoc = [];
|
||||
foreach ($this->fieldNames as $index => $name) {
|
||||
$assoc[$name] = $result[$index];
|
||||
}
|
||||
|
||||
return $this->currentRow = $assoc;
|
||||
return $this->currentRow = \array_combine($this->fieldNames, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user