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 commentedComment #2
anavarreShould be wrapped at 80 cols.
Else this looks good to me.
Comment #3
bojanz commentedAddressed #2.
Comment #4
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 commentedI've fixed the "Get" instances.
Comment #7
dom. commentedStill some missings.... sorry
Example DataTimePLus.php :
You could look at all occurences of "function get" in Drupal/Component folder.
Comment #8
dom. commentedComment #9
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 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 commentedCome on, testbot.
Comment #18
bojanz commentedAnd we're back.
Comment #22
bojanz 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!