@@ -100,13 +100,13 @@ |
||
100 | 100 | ]; |
101 | 101 | } |
102 | 102 | |
103 | - if($this->hasAttribute('lft')&&$this->hasAttribute('rgt')&&$this->hasAttribute('depth')){ |
|
103 | + if ($this->hasAttribute('lft') && $this->hasAttribute('rgt') && $this->hasAttribute('depth')) { |
|
104 | 104 | $behaviors['tree'] = ArrayHelper::merge([ |
105 | 105 | 'class' => NestedSetsBehavior::className(), |
106 | 106 | 'leftAttribute' => 'lft', |
107 | 107 | 'rightAttribute' => 'rgt', |
108 | 108 | 'depthAttribute' => 'depth', |
109 | - ], ($this->hasAttribute('tree')?['treeAttribute' => 'tree']:[])); |
|
109 | + ], ($this->hasAttribute('tree') ? ['treeAttribute' => 'tree'] : [])); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | return $behaviors; |