Code Duplication    Length = 5-5 lines in 2 locations

src/actions/AdjacencyList/FullTreeDataAction.php 1 location

@@ 116-120 (lines=5) @@
113
            $query = $class::find()
114
                ->orderBy([$this->querySortOrder => SORT_ASC]);
115
116
            if ($this->whereCondition instanceof \Closure) {
117
                $query->where(call_user_func($this->whereCondition));
118
            } elseif (count($this->whereCondition) > 0) {
119
                $query->where($this->whereCondition);
120
            }
121
122
            if (null === $rows = $query->asArray()->all()) {
123
                return [];

src/actions/AdjacencyList/PartialTreeDataAction.php 1 location

@@ 102-106 (lines=5) @@
99
            $query = $class::find()
100
                ->orderBy([$this->querySortOrder => SORT_ASC]);
101
102
            if ($this->whereCondition instanceof \Closure) {
103
                $query->where(call_user_func($this->whereCondition));
104
            } elseif (count($this->whereCondition) > 0) {
105
                $query->where($this->whereCondition);
106
            }
107
            $query->andWhere([$this->modelParentAttribute => $parent_id]);
108
109
            if (null === $rows = $query->asArray()->all()) {