Commit d199baf8 authored by Tobias Schultze's avatar Tobias Schultze

Fix return type of Connection::project

parent d1267280
...@@ -892,12 +892,12 @@ class Connection implements DriverConnection ...@@ -892,12 +892,12 @@ class Connection implements DriverConnection
* The function receives a single parameter, an array, that * The function receives a single parameter, an array, that
* represents a row of the result set. * represents a row of the result set.
* *
* @return mixed The projected result of the query. * @return array The projected result of the query.
*/ */
public function project($query, array $params, Closure $function) public function project($query, array $params, Closure $function)
{ {
$result = array(); $result = array();
$stmt = $this->executeQuery($query, $params ?: array()); $stmt = $this->executeQuery($query, $params);
while ($row = $stmt->fetch()) { while ($row = $stmt->fetch()) {
$result[] = $function($row); $result[] = $function($row);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment