Opened 7 years ago
Closed 6 years ago
#3233 closed defect (bug) (fixed)
Inline comments must end in full-stops,exclamation marks, or question marks missing wp standard in doc
Reported by: | mp518 | Owned by: | obenland |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Support Forums | Keywords: | has-patch |
Cc: |
Description
Inline comments must end in full-stops,exclamation marks, or question marks as per WordPress standard.
Attachments (1)
Change History (5)
#1
follow-up:
↓ 2
@
7 years ago
- Milestone Plugin Directory v3.0 deleted
- Resolution set to invalid
- Status changed from new to closed
The WordPress standard has no such rule.
#2
in reply to:
↑ 1
;
follow-up:
↓ 3
@
7 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
Replying to Otto42:
The WordPress standard has no such rule.
https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#5-inline-comments
https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#5-1-single-line-comments
It does actually, the example given // Allow plugins to filter an array.
includes a full-stop at the end of the line, it is also enforced by the WordPress PHPCS ruleset.
Also:
- https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#1-functions-class-methods:
- >
@param
: Note if the parameter is Optional before the description, and include a period at the end. The description should mention accepted values as well as the default. For example: Optional. This value does something. Accepts ‘post’, ‘term’, or empty. Default empty. - >
@return
: Should contain all possible return types, and a description for each. Use a period at the end. Note: @return void should not be used outside of the default bundled themes.
- >
Note: See
TracTickets for help on using
tickets.
correct