1
0
Fork 0
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:
Alexander Kochetov 2015-01-03 19:44:04 +03:00
parent 12afd2dc78
commit 4e0a5e4ed4

View file

@ -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;
}