As described in #2471485: [Meta] 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.
The node module is used by many to see how to do stuff, so it makes sense that we want this to be consistent.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | standardize_getter-2472147-12.patch | 8.96 KB | googletorp |
| #11 | interdiff-10-11.txt | 722 bytes | anavarre |
| #11 | standardize_getter-2472147-11.patch | 8.96 KB | anavarre |
| #10 | standardize_getter-2472147-10.patch | 8.96 KB | jaredsmith |
| #10 | interdiff-2472147-7-10.txt | 2.57 KB | jaredsmith |
Comments
Comment #1
googletorp commentedI also added some missing @return documentation in the progress.
Comment #2
bojanz commentedRerolled and extended.
Comment #3
anavarreLooks good.
Comment #4
xjmThanks @anavarre and @bojanz! The reformatting of the one-line summaries is all fine, but if we're also adding the return value documentation as part of the scope, can we do a little more work to make it more useful? Specifically:
So normally, we would document the structure of an array for multidimensional array formats -- otherwise it's just redundant and not really helpful. I guess we could just reference
PermissionHandlerInterface?Same here; can we make this a little more useful if we are adding this documentation? What is the data type of the array children?
Are these actually
\Drupal\Core\Database\StatementInterface[]rather than justarray?This description also isn't really clear; could we improve it?
Comment #5
googletorp commented@xjm I addressed the things you mentioned, improving the documentation.
Regarding your 3. it's actually returning int[] (list of wid).
Comment #6
anavarrePlease remove the trailing dot.
s/readble/readable
I wonder if we should replace 'wids' by something more explicit (after all this is documentation) like 'Watchdog IDs'?
s/recoards/records
Comment #7
googletorp commentedThanks for the nitpicks and typos - note to self, to do documentation when you're tired.
Comment #8
anavarreThanks! - I think all of @xjm's points have been addressed. Tentatively marking this back to RTBC.
Comment #9
xjmNice, thanks! That works. Two other minor cleanups (which I almost could have fixed on commit) but also one more substantive question.
Shouldn't these two docblocks be similar? Also I don't quite understand the difference between them now (reading it).
Maybe "which node access was tested"?
Minor: "english" should be capitalized.
@jaredsmith said he could take a look at this quickly.
Comment #10
jaredsmith commentedI fixed up the issues identified by @xjm in comment 9. I also fixed a couple of other minor grammar issues along the way.
I'm setting this back to RTBC, as the changes are very minor. (If you disagree, feel free to set it back to "Needs Review".)
Comment #11
anavarreThanks, @jaredsmith - Fixing a super minor remaining nit.
Comment #12
googletorp commentedMissing a * in the doc block.
Comment #14
xjmExcellent, thanks @jaredsmith, @anavarre, and @googletorp for the quick fixes.
Hah, so the latter method is just misleadingly named (I confirmed these updated docs are correct after reading the test). The method names are not in scope, though, and the improved documentation from this patch will offset that in any case.
This 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!