From 0501d21b89d37e5d383f96bb5e5236a05a08317f Mon Sep 17 00:00:00 2001 From: vjik Date: Tue, 16 Jan 2024 07:11:23 +0000 Subject: [PATCH] Apply Rector changes (CI) --- src/KeysetPagination.php | 4 +--- src/OffsetPagination.php | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/KeysetPagination.php b/src/KeysetPagination.php index a65fea486..b8f9b28f2 100644 --- a/src/KeysetPagination.php +++ b/src/KeysetPagination.php @@ -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 diff --git a/src/OffsetPagination.php b/src/OffsetPagination.php index 6f3ba1997..a4b4f02ab 100644 --- a/src/OffsetPagination.php +++ b/src/OffsetPagination.php @@ -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