[wp-trac] [WordPress Trac] #56648: Improve comment type for Single line comment

WordPress Trac noreply at wordpress.org
Wed Sep 28 15:18:37 UTC 2022


#56648: Improve comment type for Single line comment
------------------------------+-------------------------------
 Reporter:  rajanpanchal2028  |       Owner:  (none)
     Type:  enhancement       |      Status:  closed
 Priority:  low               |   Milestone:
Component:  General           |     Version:
 Severity:  minor             |  Resolution:  invalid
 Keywords:  has-patch         |     Focuses:  coding-standards
------------------------------+-------------------------------

Comment (by davidbaumwald):

 @jrf Thanks for the info!  I also found the
 [https://developer.wordpress.org/coding-standards/inline-documentation-
 standards/php/#3-requires-and-includes inline docs standards], and it
 seems to suggest a docblock, not a comment.  I understand that you
 suggested a short-form docblock, so that may be the same thing.  Does Core
 follow PSR-5 in this instance or WPCS?

 Is this something we could add/clarify in the docs for specifically
 documenting includes?

 Also wondering if we should standardize this across the codebase.

 For some data, Core is currently a bit inconsistent: (Props to @desrosj
 for the data here)
 * `require*` with full DocBlock: '''55 (26 within default themes)'''
 * `require*`  with inline `/** comment */`: '''216'''
 * No include statements with preceding comment of either style.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56648#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list