diff --git a/CHANGELOG.md b/CHANGELOG.md index 923cf63..b30e936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# 0.12.0 + +* fix(`PagerItem`): `withPageNumber` should return static + # 0.11.2 * fix: add interface covariance where applicable diff --git a/packages/rekapager-contracts/src/PageInterface.php b/packages/rekapager-contracts/src/PageInterface.php index a46b72b..c266107 100644 --- a/packages/rekapager-contracts/src/PageInterface.php +++ b/packages/rekapager-contracts/src/PageInterface.php @@ -37,10 +37,7 @@ public function getPageIdentifier(): object; */ public function getPageNumber(): ?int; - /** - * @return self - */ - public function withPageNumber(?int $pageNumber): self; + public function withPageNumber(?int $pageNumber): static; /** * @return PageableInterface diff --git a/packages/rekapager-core/src/Pager/Internal/PagerItem.php b/packages/rekapager-core/src/Pager/Internal/PagerItem.php index 8e21353..75fbc27 100644 --- a/packages/rekapager-core/src/Pager/Internal/PagerItem.php +++ b/packages/rekapager-core/src/Pager/Internal/PagerItem.php @@ -43,10 +43,7 @@ public function __construct( $this->pageNumber = new NullPageNumber(); } - /** - * @return self - */ - public function withPageNumber(?int $pageNumber): self + public function withPageNumber(?int $pageNumber): static { return new self( wrapped: $this->wrapped->withPageNumber($pageNumber),