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 part of this meta issue: Make flag module pass coder review
In this issue, we plan to fix the missing type hinting from '@return' and '@param' positions. We DO NOT aim to add any new doc blocks here.
Comment | File | Size | Author |
---|---|---|---|
#7 | interdiff-5-7.txt | 2.26 KB | cs_shadow |
#7 | flag-add_missing_type_hintings-2245609-7.patch | 22.15 KB | cs_shadow |
#5 | flag-add_missing_type_hintings-2245609-5.patch | 22.19 KB | cs_shadow |
#1 | flag-add_missing_type_hintings-2245609-1.patch | 22.18 KB | cs_shadow |
Comments
Comment #1
cs_shadow CreditAttribution: cs_shadow commentedAdd type hinting for several @params and @returns. Need review one this one to proceed further.
Comment #2
joachim CreditAttribution: joachim commentedArgh, this is probably going to clash with the work I'm doing at #2202969: clean up flag() and its low-level helpers. I'd rather postpone it until that's in.
Comment #3
cs_shadow CreditAttribution: cs_shadow commentedMaybe this issue can be opened now, as the blocking issue has been closed.
Comment #4
joachim CreditAttribution: joachim commentedYup. It'll need a reroll, sorry!
Comment #5
cs_shadow CreditAttribution: cs_shadow commentedRe-rolled the patch in #1.
Comment #6
joachim CreditAttribution: joachim commentedThanks for rerolling. There's a few mistakes in the patch, however:
This is an array.
This doesn't look right.
Do we need to say NULL for an optional parameter? Isn't that implicit by it being optional?
It's an integer not an object.
Callable? Though I don't know if this actually takes a full PHP callable -- would need to check the function code.
This doesn't look right.
This is a user account object, not a string.
Same here: user account entity.
Comment #7
cs_shadow CreditAttribution: cs_shadow commentedFixed the errors mentioned in #6. Attaching patch and interdiff.
Comment #8
cs_shadow CreditAttribution: cs_shadow commentedComment #9
joachim CreditAttribution: joachim commentedCommitted, with a minor reroll where a couple of hunks failed.
Thanks, and sorry it's taken me ages to get back to this!
Comment #11
cs_shadow CreditAttribution: cs_shadow commentedThanks for committing :) Better late than never.