Skip to content

Commit ea963f9

Browse files
committed
Refactor
1 parent f5d6084 commit ea963f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/providers/JsonApiActiveDataProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ public function setPagination($value):void
6464
throw new InvalidArgumentException('Only JsonApiPaginator instance or false allowed');
6565
}
6666
$this->_pagination->totalCount = $this->getTotalCount();
67-
} elseif ($value instanceof JsonApiPaginator || $value === false) {
67+
} elseif ($value instanceof JsonApiPaginator) {
6868
$this->_pagination = $value;
69-
if ($value instanceof JsonApiPaginator) {
70-
$this->_pagination->totalCount = $this->getTotalCount();
71-
}
69+
$this->_pagination->totalCount = $this->getTotalCount();
70+
} elseif ($value === false) {
71+
$this->_pagination = false;
7272
} else {
7373
throw new InvalidArgumentException('Only JsonApiPaginator instance, configuration array or false is allowed.');
7474
}

0 commit comments

Comments
 (0)