diff --git a/src/Model/Behavior/TreeBehavior.php b/src/Model/Behavior/TreeBehavior.php index 415fca12552..832870b3651 100644 --- a/src/Model/Behavior/TreeBehavior.php +++ b/src/Model/Behavior/TreeBehavior.php @@ -219,7 +219,7 @@ public function moveUp($id, $number = 1) { * @return integer */ protected function _getMax() { - return $this->__getMaxOrMin('max'); + return $this->_getMaxOrMin('max'); } /** @@ -228,7 +228,7 @@ protected function _getMax() { * @return integer */ protected function _getMin() { - return $this->__getMaxOrMin('min'); + return $this->_getMaxOrMin('min'); } /** @@ -237,10 +237,10 @@ protected function _getMin() { * @param string $maxOrMin Either 'max' or 'min' * @return integer */ - private function __getMaxOrMin($maxOrMin = 'max') { + protected function _getMaxOrMin($maxOrMin = 'max') { extract($this->config()); - $LorR = $maxOrMin == 'max' ? $right : $left; - $DorA = $maxOrMin == 'max' ? 'DESC' : 'ASC'; + $LorR = $maxOrMin === 'max' ? $right : $left; + $DorA = $maxOrMin === 'max' ? 'DESC' : 'ASC'; $edge = $this->_scope($this->_table->find()) ->select([$LorR])