Skip to content

Commit 52518ce

Browse files
authored
Merge pull request #6 from AppsDevTeam/improvements
Update QueryObjectDataSource.php
2 parents bd091a4 + d38c723 commit 52518ce

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/QueryObjectDataSource.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public function getData(): array {
118118
if ($this->data) {
119119
return $this->data;
120120
}
121+
121122
return $this->getResultSet()->toArray();
122123
}
123124

@@ -140,15 +141,14 @@ public function filter(array $filters): void
140141
if (is_callable($this->filterCallback)) {
141142
call_user_func($this->filterCallback, $this->queryObject, $filters);
142143
}
143-
else {
144-
foreach ($filters as $filter) {
145-
if ($filter->isValueSet()) {
146-
if ($filter->getConditionCallback()) {
147-
call_user_func($filter->getConditionCallback(), $this->queryObject, $filter->getValue());
148-
}
149-
elseif ($this->queryObject instanceof IQueryObject) {
150-
$this->queryObject->searchIn($filter->getKey(), $filter->getValue(), !$filter instanceof FilterText);
151-
}
144+
145+
foreach ($filters as $filter) {
146+
if ($filter->isValueSet()) {
147+
if ($filter->getConditionCallback()) {
148+
call_user_func($filter->getConditionCallback(), $this->queryObject, $filter->getValue());
149+
}
150+
elseif ($this->queryObject instanceof IQueryObject) {
151+
$this->queryObject->searchIn($filter->getKey(), $filter->getValue(), !$filter instanceof FilterText);
152152
}
153153
}
154154
}

0 commit comments

Comments
 (0)