diff --git a/src/Datasource/QueryTrait.php b/src/Datasource/QueryTrait.php index c059d1e4149..ca3bcf0096a 100644 --- a/src/Datasource/QueryTrait.php +++ b/src/Datasource/QueryTrait.php @@ -270,8 +270,7 @@ public function mapReduce(callable $mapper = null, callable $reducer = null, $ov * to fetch the results from the database. * * Formatting callbacks will get a first parameter, a `ResultSetDecorator`, that - * can be traversed and modified at will. As for the second parameter, the - * formatting callback will receive this query instance. + * can be traversed and modified at will. * * Callbacks are required to return an iterator object, which will be used as * the return value for this query's result. Formatter functions are applied @@ -287,12 +286,12 @@ public function mapReduce(callable $mapper = null, callable $reducer = null, $ov * * ``` * // Return all results from the table indexed by id - * $query->select(['id', 'name'])->formatResults(function ($results, $query) { + * $query->select(['id', 'name'])->formatResults(function ($results) { * return $results->indexBy('id'); * }); * * // Add a new column to the ResultSet - * $query->select(['name', 'birth_date'])->formatResults(function ($results, $query) { + * $query->select(['name', 'birth_date'])->formatResults(function ($results) { * return $results->map(function ($row) { * $row['age'] = $row['birth_date']->diff(new DateTime)->y; * return $row;