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.
As described in #2471485: Standardize getter docblocks we want to standardize on using "Gets" instead of "Returns" on getter docblocks, matching the outside world and making core internally consistent. In general, we make the verb match the one in the method name.
Drupal\Component is the part of Drupal that's the most outwards facing, so it makes sense to start from there.
I will reroll any patch broken by these changes.
Comment | File | Size | Author |
---|---|---|---|
#22 | 2471571-22-standardize-getter-docblocks.patch | 22.96 KB | bojanz |
#11 | 2471571-11-standardize-getter-docblocks.patch | 22.66 KB | bojanz |
#9 | 2471571-9-standardize-getter-docblocks.patch | 22.7 KB | bojanz |
#6 | 2471571-6-standardize-getter-docblocks.patch | 22.26 KB | bojanz |
#4 | example-of-missings.txt | 9.35 KB | Dom. |
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedComment #2
anavarreShould be wrapped at 80 cols.
Else this looks good to me.
Comment #3
bojanz CreditAttribution: bojanz commentedAddressed #2.
Comment #4
Dom. CreditAttribution: Dom. commentedHi !
For me, a lot are missing to follow the convention strictly. I just added some of those per example in the file attached. What do you think ?
Comment #5
anavarreComment #6
bojanz CreditAttribution: bojanz commentedI've fixed the "Get" instances.
Comment #7
Dom. CreditAttribution: Dom. commentedStill some missings.... sorry
Example DataTimePLus.php :
You could look at all occurences of "function get" in Drupal/Component folder.
Comment #8
Dom. CreditAttribution: Dom. commentedComment #9
bojanz CreditAttribution: bojanz commentedDone that one as well.
I'm stopping here, it's fine if we miss a few in the initial go, as long as most of them are covered.
Comment #10
dawehnerSo strictly we have the one line thing for the first row, should we tackle that here?
Comment #11
bojanz CreditAttribution: bojanz commentedChanged it to "Gets the full path of the file's containing directory.", the full description remains in @returns.
Comment #12
dawehnerThank you!
Comment #14
bojanz CreditAttribution: bojanz commentedCome on, testbot.
Comment #18
bojanz CreditAttribution: bojanz commentedAnd we're back.
Comment #22
bojanz CreditAttribution: bojanz at Centarro commentedRebased.
Comment #24
xjmThis issue only changes documentation, so per https://www.drupal.org/core/beta-changes, this can be completed any time during the Drupal 8 beta phase. Committed and pushed to 8.0.x. Thanks!