Skip to content

Commit

Permalink
update, code adjustments
Browse files Browse the repository at this point in the history
- getMaxOrMin visibility
- strict comparison.
  • Loading branch information
quickapps authored and lorenzo committed Mar 29, 2014
1 parent e6a26fd commit c3d6199
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Model/Behavior/TreeBehavior.php
Expand Up @@ -219,7 +219,7 @@ public function moveUp($id, $number = 1) {
* @return integer
*/
protected function _getMax() {
return $this->__getMaxOrMin('max');
return $this->_getMaxOrMin('max');
}

/**
Expand All @@ -228,7 +228,7 @@ protected function _getMax() {
* @return integer
*/
protected function _getMin() {
return $this->__getMaxOrMin('min');
return $this->_getMaxOrMin('min');
}

/**
Expand All @@ -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])
Expand Down

0 comments on commit c3d6199

Please sign in to comment.