#41452 closed task (blessed) (fixed)
Remove @access tags from core DocBlocks
Reported by: | DrewAPicture | Owned by: | DrewAPicture |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
Per discussion in #core-docs last week, we're finally to the point where we can remove @access
notations from DocBlocks throughout core, with a few exceptions:
- Any standalone core functions marked private
- Any classes marked private (such as the List Table classes, for instance)
The parser that builds the Code Reference already references actual method visibility as derived with phpDocumentor, meaning that output will be unchanged following the removals.
In terms of anything marked private (including the aforementioned exceptions) the Code Reference theme already handles displaying a specially-designed callout box.
Attachments (4)
Change History (17)
#2
@
7 years ago
41452.2.diff covers classes in wp-admin
#3
@
7 years ago
The first passes appeared to miss some files. Maybe I was accidentally skipping them when I was clicking though or something.
Anyway, 41452-wp-admin.diff covers wp-admin, and 41452-wp-includes.diff covers wp-includes.
#4
in reply to:
↑ description
@
7 years ago
Replying to DrewAPicture:
Per discussion in #core-docs last week, we're finally to the point where we can remove
@access
notations from DocBlocks throughout core, with a few exceptions:
- Any standalone core functions marked private
- Any classes marked private (such as the List Table classes, for instance)
Great idea, having @access public
in the DocBlocks is redundant, as it's already in the code itself.
#7
@
7 years ago
Note: the inline documentation standards for PHP have been updated to reflect this change.
#8
@
7 years ago
@jrf: Leaving a note for you here assuming you may need to make adjustments to any WPCS rules around @access
tags.
@coffee2code: I grokked the parser and wporg-developer code last week and I think we're good in terms of parsing since we store the method visibility in meta and already check against it with a fallback to the access tag. The fallback can continue to handle the exceptions outlined above.
#9
@
7 years ago
@DrewAPicture At this moment the WPCS Docs ruleset does not (yet) check these kind of things in that much detail.
When the ruleset is improved in the future, this will need to be taken into account by whoever does the improving.
41452.diff covers classes in wp-includes.