mirror of
https://github.com/danog/postgres.git
synced 2024-12-02 09:27:54 +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]);
|
$result[$column] = $this->cast($column, $result[$column]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$assoc = [];
|
return $this->currentRow = \array_combine($this->fieldNames, $result);
|
||||||
foreach ($this->fieldNames as $index => $name) {
|
|
||||||
$assoc[$name] = $result[$index];
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->currentRow = $assoc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user