Skip to content

Commit

Permalink
fix(PagerItem): withPageNumber should return static (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi authored Jun 20, 2024
1 parent 67c11c9 commit 897ea2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 0.12.0

* fix(`PagerItem`): `withPageNumber` should return static

# 0.11.2

* fix: add interface covariance where applicable
Expand Down
5 changes: 1 addition & 4 deletions packages/rekapager-contracts/src/PageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ public function getPageIdentifier(): object;
*/
public function getPageNumber(): ?int;

/**
* @return self<TKey,T>
*/
public function withPageNumber(?int $pageNumber): self;
public function withPageNumber(?int $pageNumber): static;

/**
* @return PageableInterface<TKey,T>
Expand Down
5 changes: 1 addition & 4 deletions packages/rekapager-core/src/Pager/Internal/PagerItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ public function __construct(
$this->pageNumber = new NullPageNumber();
}

/**
* @return self<TKey,T>
*/
public function withPageNumber(?int $pageNumber): self
public function withPageNumber(?int $pageNumber): static
{
return new self(
wrapped: $this->wrapped->withPageNumber($pageNumber),
Expand Down

0 comments on commit 897ea2a

Please sign in to comment.