You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New 'PageNotFoundException' Class Added
A new class named 'PageNotFoundException' has been created in the Paginator source code. This will handle scenarios where a page is not found during pagination.
Improved Parameter Annotations in Keyset and Offset Paginators
The KeysetPaginator and OffsetPaginator source files have new annotations to enhance code clarity and predictability. These indicate the type of variables and the expected return values of the methods. In particular, the annotations make clear that certain values should be positive or non-negative integers.
Switched Exception Handling to Use New Class
The use of the older 'PaginatorException' class has been replaced with the new 'PageNotFoundException' class in the 'read()' and 'isOnFirstPage()' methods within various Paginator files, offering more specific and accurate exception handling.
Update to Test Expectations
In the testing file 'OffsetPaginatorTest.php', the expected exceptions in multiple methods are now aligned with the newly introduced 'PageNotFoundException' class. Further, a test that was previously expected to throw an exception, testGetCurrentPageCannotBeLargerThanMaxPages, has been revised to now include an assertion for 'getCurrentPageSize()'.
Added Return Type for 'count' Method in CountableDataInterface File
The count() method in the 'CountableDataInterface' now has an annotation to denote that it should return a non-negative integer. This enhances code clarity by specifying the expected behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.