[wp-trac] [WordPress Trac] #52603: Inconsistent doc for return value of wp_generate_attachment_metadata

WordPress Trac noreply at wordpress.org
Tue Jun 15 19:09:06 UTC 2021


#52603: Inconsistent doc for return value of wp_generate_attachment_metadata
------------------------------+-----------------------------
 Reporter:  Chouby            |       Owner:  SergeyBiryukov
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:  5.8
Component:  Media             |     Version:  2.5
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:  docs
------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:10 hellofromTonya]:
 > Reopening for a small coding standards follow-up to [51162].
 >
 > Patch [attachment:"52603.3.diff"] reformats the multi-line comment to
 use `/*` instead of `//`.

 Thanks for the patch!

 As previously noted in comment:1:ticket:53004 and comment:9:ticket:52025,
 there are many other instances in core of the single-line comment style
 being used for multi-line comments.

 There is a [https://make.wordpress.org/core/handbook/best-practices
 /inline-documentation-standards/php/#5-inline-comments section in the
 documentation standards] that clarifies which format is generally
 recommended, but that is just a recommendation and not a strict rule.

 This was previously corrected for most of inline comments in core in
 [47122]. I think I opted to keep comments with one or two lines in single
 line format, and switch comments with three or more lines to the multi-
 line format.

 At this time, until we have a WPCS rule that forbids using this comment
 style for multi-line comments, I think it makes sense to keep using single
 line format for comments with one or two lines.

 That said, I have no objections converting this comment to three lines :)

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


More information about the wp-trac mailing list