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
Fix mismatched parameter names in child classes (Trac 51553 - task 1) #612
Fix mismatched parameter names in child classes (Trac 51553 - task 1) #612
Conversation
409b3e4
to
35bbe54
Compare
Rebased for merge conflicts due to 5b6a20a |
@desrosj I would have happily rebased ... |
Sorry! I was actively reviewing so figured I'd just update to use the same PR. Updating the ticket soon! |
34f9683
to
b400b9f
Compare
795f67a
to
f6f903f
Compare
f6f903f
to
90955ba
Compare
Related to 51553 - Task 1
90955ba
to
e0ffece
Compare
Related to 51553 - Task 1
Related to 51553 - Task 1
Related to 51553 - Task 1
… as param When the name used in the child method was significantly more descriptive, the parameter is renamed, but the old name is still used within the function itself. Related to 51553 - Task 1 + Task 2-2
The parent class used `$current_object_id`, while most child classes used `$id`. Again, a parameter name mismatch. As `$current_object_id` is **more** descriptive than the extremely generic `$id`, we decided to use the parent class name everywhere. Related to 51553 - Task 1 + Task 2-2
…s param When the name used in the child method was significantly more descriptive, the parameter is renamed, but the old name is still used within the function itself. Related to 51553 - Task 1 + Task 2-2
…ed keyword as param When the name used in the child method was significantly more descriptive, the parameter is renamed, but the old name is still used within the function itself. Related to 51553 - Task 1 + Task 2-2
Related to 51553 - Task 1
Related to 51553 - Task 1
Related to 51553 - Task 1
Related to 51553 - Task 1
…mismatches Related to 51553 - Task 1
…tches Related to 51553 - Task 1
Related to 51553 - Task 1
…ches Related to 51553 - Task 1
Related to 51553 - Task 1
Related to 51553 - Task 1
e0ffece
to
c829005
Compare
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.
I did a thorough deep code review multiple times during pair programming sessions with @jrfnl. The PR is ready for commit 👍
Each atomic commit as been committed with the following changesets https://core.trac.wordpress.org/log/?revs=51728,51734-51735,51737,51739,51779-51790 |
This PR fixes all known instances of parameter name mismatches between methods in child classes vs the names used in the parent class.
Notes:
Ref: https://www.php.net/manual/en/language.oop5.variance.php
Trac ticket: https://core.trac.wordpress.org/ticket/51553
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.