mirror of
https://github.com/Oreolek/yii2-nested-sets.git
synced 2024-07-01 05: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();
|
$model = new $this->owner->modelClass();
|
||||||
$db = $model->getDb();
|
$db = $model->getDb();
|
||||||
|
|
||||||
$this->owner->andWhere(new Expression(
|
$this->owner
|
||||||
$db->quoteColumnName($model->rightAttribute) . ' - ' . $db->quoteColumnName($model->leftAttribute) . ' = 1'
|
->andWhere(new Expression($db->quoteColumnName($model->rightAttribute)
|
||||||
))->addOrderBy([$model->leftAttribute => SORT_ASC]);
|
. ' - ' . $db->quoteColumnName($model->leftAttribute) . ' = 1'))
|
||||||
|
->addOrderBy([$model->leftAttribute => SORT_ASC]);
|
||||||
|
|
||||||
return $this->owner;
|
return $this->owner;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue