Skip to content

Commit

Permalink
Reduce variable use/duplicate code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimegede committed Sep 1, 2013
1 parent 64cf405 commit 09bdad6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/Model/Model.php
Expand Up @@ -796,8 +796,8 @@ public function __call($method, $params) {
if ($result !== array('unhandled')) {
return $result;
}
$return = $this->getDataSource()->query($method, $params, $this);
return $return;

return $this->getDataSource()->query($method, $params, $this);
}

/**
Expand Down Expand Up @@ -2957,8 +2957,9 @@ protected function _findList($state, $query, $results = array()) {
* @return array
*/
protected function _findNeighbors($state, $query, $results = array()) {
extract($query);

if ($state === 'before') {
extract($query);
$conditions = (array)$conditions;
if (isset($field) && isset($value)) {
if (strpos($field, '.') === false) {
Expand All @@ -2976,7 +2977,6 @@ protected function _findNeighbors($state, $query, $results = array()) {
return $query;
}

extract($query);
unset($query['conditions'][$field . ' <']);
$return = array();
if (isset($results[0])) {
Expand Down

0 comments on commit 09bdad6

Please sign in to comment.