Permalink
Browse files

Be consistent with the result set variable name.

  • Loading branch information...
bar committed Dec 21, 2013
1 parent 0adc062 commit 5ccb77e25d3c8f98818ea1a7b76f80680f599ed8
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/Cake/Model/Datasource/DboSource.php
@@ -1158,17 +1158,17 @@ public function read(Model $Model, $queryData = array(), $recursive = null) {
*
* The primary model is always excluded, because the filtering is later done by Model::_filterResults().
*
- * @param array $results Reference of resultset to be filtered
- * @param Model $Model Instance of model to operate against
- * @param array $filtered List of classes already filtered, to be skipped
- * @return array Array of results that have been filtered through $Model->afterFind
+ * @param array $resultSet Reference of resultset to be filtered.
+ * @param Model $Model Instance of model to operate against.
+ * @param array $filtered List of classes already filtered, to be skipped.
+ * @return array Array of results that have been filtered through $Model->afterFind.
*/
- protected function _filterResults(&$results, Model $Model, $filtered = array()) {
- if (!is_array($results)) {
+ protected function _filterResults(&$resultSet, Model $Model, $filtered = array()) {
+ if (!is_array($resultSet)) {
return array();
}
- $current = reset($results);
+ $current = reset($resultSet);
if (!is_array($current)) {
return array();
}
@@ -1184,12 +1184,12 @@ protected function _filterResults(&$results, Model $Model, $filtered = array())
$LinkedModel = $Model->{$className};
$filtering[] = $className;
- foreach ($results as $key => &$result) {
+ foreach ($resultSet as $key => &$result) {
$data = $LinkedModel->afterFind(array(array($className => $result[$className])), false);
if (isset($data[0][$className])) {
$result[$className] = $data[0][$className];
} else {
- unset($results[$key]);
+ unset($resultSet[$key]);
}
}
}

0 comments on commit 5ccb77e

Please sign in to comment.