mirror of
https://github.com/danog/postgres.git
synced 2024-11-29 20:19:10 +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