Opened 9 years ago
Closed 8 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 |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| 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
@
9 years ago
- Milestone Plugin Directory v3.0
- Resolution → invalid
- Status new → closed
The WordPress standard has no such rule.
#2
in reply to: ↑ 1
;
follow-up:
↓ 3
@
9 years ago
- Resolution invalid
- Status closed → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
correct