original_string: public function leaves() {
          $condition = [
              'and',
              [$this->leftAttribute => ['$gt' => $this->owner->getAttribute($this->leftAttribute)]],
              [$this->rightAttribute => ['$lt' => $this->owner->getAttribute($this->rightAttribute)]],
              ['$where' => "this.{$this->rightAttribute} = this.{$this->leftAttribute} + 1"]
          ];
  
          $this->applyTreeAttributeCondition($condition);
  
          return $this->owner->find()->andWhere($condition)->addOrderBy([$this->leftAttribute => SORT_ASC]);
      }
code: public function leaves() {
          $condition = [
              'and',
              [$this->leftAttribute => ['$gt' => $this->owner->getAttribute($this->leftAttribute)]],
              [$this->rightAttribute => ['$lt' => $this->owner->getAttribute($this->rightAttribute)]],
              ['$where' => "this.{$this->rightAttribute} = this.{$this->leftAttribute} + 1"]
          ];
  
          $this->applyTreeAttributeCondition($condition);
  
          return $this->owner->find()->andWhere($condition)->addOrderBy([$this->leftAttribute => SORT_ASC]);
      }
code_tokens: public function leaves ( ) { $ condition = [ 'and' , [ $ this -> leftAttribute => [ '$gt' => $ this -> owner -> getAttribute ( $ this -> leftAttribute ) ] ] , [ $ this -> rightAttribute => [ '$lt' => $ this -> owner -> getAttribute ( $ this -> rightAttribute ) ] ] , [ '$where' => "this.{$this->rightAttribute} = this.{$this->leftAttribute} + 1" ] ] ; $ this -> applyTreeAttributeCondition ( $ condition ) ; return $ this -> owner -> find ( ) -> andWhere ( $ condition ) -> addOrderBy ( [ $ this -> leftAttribute => SORT_ASC ] ) ; }
docstring: Gets the leaves of the node.
  @return \yii\db\ActiveQuery
docstring_tokens: Gets the leaves of the node .