mirror of
https://github.com/Oreolek/yii2-nested-sets.git
synced 2024-06-29 04:55:00 +03:00
NestedSetsQueryBehavior code style fix
This commit is contained in:
parent
12afd2dc78
commit
4e0a5e4ed4
|
@ -43,9 +43,10 @@ class NestedSetsQueryBehavior extends Behavior
|
|||
$model = new $this->owner->modelClass();
|
||||
$db = $model->getDb();
|
||||
|
||||
$this->owner->andWhere(new Expression(
|
||||
$db->quoteColumnName($model->rightAttribute) . ' - ' . $db->quoteColumnName($model->leftAttribute) . ' = 1'
|
||||
))->addOrderBy([$model->leftAttribute => SORT_ASC]);
|
||||
$this->owner
|
||||
->andWhere(new Expression($db->quoteColumnName($model->rightAttribute)
|
||||
. ' - ' . $db->quoteColumnName($model->leftAttribute) . ' = 1'))
|
||||
->addOrderBy([$model->leftAttribute => SORT_ASC]);
|
||||
|
||||
return $this->owner;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue