-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add paging functionality to ResultSet #136
base: main
Are you sure you want to change the base?
Conversation
…d provides the current page if asked
…' into feature/add-paging-to-result-set # Conflicts: # src/ResultSet.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please drop all changes to existing parameter and return types, which would break bc
- If you add a missing docstring, document everything not just a few things (short description, params, return type, throws, etc)
- The short description of docstrings must be phrased as instruction, not as description (i.e. "Set" instead of "Sets" and "Return" instead of "Returns")
- Format multiline docstrings this way:
/** * Short description * * [Long description] * * @param declarations * * @return declaration * * @throws declaration */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please update the baseline, so that at least the ignored patterns are removed
- Please add tests for the page number calculation
…et paging, fixed PHPStan configuration, rebuilt baseline, refactored return type annotation
@ncosta-ic @nilmerg What's the motivation for this PR, i.e. when and how would I use it? Regarding the PHPDocs: Please don't use @see protected property for public methods. |
It's part of an attempt to move Icinga DB Web's and Notification Web's
Why? |
If I had to guess: Because public methods (and thus their documentation) could be used outside of the extended class, which would then reference protected properties that could not be accesses in that scope |
…red ResultSet class, reverted PHPStan configuration
Adds basic paging functionality to the ResultSet.
A page size can be set with
setPageSize(n)
and the current page (during iteration) can be retrieved withgetCurrentPage()
.