Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pagination-theme' into paginatio…
Browse files Browse the repository at this point in the history
…n-theme
  • Loading branch information
vjik committed Jan 16, 2024
2 parents 5667a44 + 0501d21 commit 804dd9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/KeysetPagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ protected function getItems(): array

protected function getPaginator(): KeysetPaginator
{
return $this->paginator === null
? throw new Exception\PaginatorNotSetException()
: $this->paginator;
return $this->paginator ?? throw new Exception\PaginatorNotSetException();
}

protected function isFirstPage(int|string $page, bool $isPrevious): bool
Expand Down
4 changes: 1 addition & 3 deletions src/OffsetPagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ protected function getItems(): array

protected function getPaginator(): OffsetPaginator
{
return $this->paginator === null
? throw new Exception\PaginatorNotSetException()
: $this->paginator;
return $this->paginator ?? throw new Exception\PaginatorNotSetException();
}

protected function isFirstPage(int|string $page, bool $isPrevious): bool
Expand Down

0 comments on commit 804dd9f

Please sign in to comment.