Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a sub-issue of #1800046: [META] Add missing type hinting to core docblocks, fix Drupal.Commenting.FunctionComment.Missing* focused on correctly adding @param and @return type hinting to the Contextual module.
Documentation patches that include type hinting are time consuming to both review and commit because one must dig into the actual code to confirm that the type hints are both correct and complete. Hence, please be patient and try to limit type hint patches to covering only a limited number of docblocks (20-25 as a guess).
How To Review This Issue
- Attempt to apply the patch to see if it needs a reroll.
- Use the phpcs one-liner to evaluate whether all the relevant standards errors have been resolved: https://gist.github.com/paul-m/227822ac7723b0e90647
- Look at each change and determine whether the type hint is correct.
Related sprint issues:
Comment | File | Size | Author |
---|---|---|---|
#4 | 1816764_4.patch | 4.27 KB | Mile23 |
Comments
Comment #1
Wim LeersThis is a subset of #1533208: Make contextual module pass Coder Review, which already has a patch. Hence merging into that issue.
Comment #2
Mile23Comment #3
Mile23This issue may be a subset of #1533208: Make contextual module pass Coder Review, but its limited scope makes it very achievable, reasonably easy to review, and it will help IDEs do autocomplete.
Marking as active.
Comment #4
Mile23Shazam.
Comment #5
Mile23Still applies.
Comment #6
Mile23Comment #7
martin107 CreditAttribution: martin107 commentedI've double checked this. these look good to me.
Comment #8
alexpottCommitted e7fcbb2 and pushed to 8.0.x. Thanks!
Assertions should return a bool - these methods just need to return the result of their assertions.
Comment #9
martin107 CreditAttribution: martin107 commentedOpps and yes ... fixing this.
Comment #10
martin107 CreditAttribution: martin107 commentedSorry for the delay ... it has taken sometime to float to the top of my todo list.
Here is the follow up