Fix #1576 to allow clearing of pages with [none] user in the last round#1591
Open
bpfoley wants to merge 5 commits into
Open
Fix #1576 to allow clearing of pages with [none] user in the last round#1591bpfoley wants to merge 5 commits into
bpfoley wants to merge 5 commits into
Conversation
To make page_tallies_add safer, pass a User rather than a username string to it so there are fewer ways for it to fail (in keeping with 'parse, don't validate')
As a cleanup, partly for consistency's sake.
This gives us a much shorter implementation, avoids repeating each property name 6 times, and make it clear that it's just a DTO (data-transfer object). Requires PHP 8.1
cpeel
reviewed
Jul 1, 2026
cpeel
left a comment
Member
There was a problem hiding this comment.
Nice use of the new constructor ability and thanks for the added typing!
Co-authored-by: Casey Peel <cpeel@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
While here, do some assorted code cleanup in
page_tally.inc. This is old code and we can take advantage of some new PHP features now.This can be checked on test on https://www.pgdp.org/~bfoley/c.branch/clear-round-nouser/tools/project_manager/page_detail.php?project=projectID5e2676b51011e. This project contains a lot of pages with
[none]as the proofreader.