Permalink
Browse files

Reduce variable use/duplicate code.

  • Loading branch information...
1 parent 64cf405 commit 09bdad6ceb2b2bf066fe1f3f785f4cbf8ab63cc2 @kimegede kimegede committed Sep 1, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/Cake/Model/Model.php
View
@@ -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);
}
/**
@@ -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) {
@@ -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])) {

0 comments on commit 09bdad6

Please sign in to comment.