[wp-trac] [WordPress Trac] #62281: Docblock improvements for WP 6.8

WordPress Trac noreply at wordpress.org
Sat Nov 2 14:59:37 UTC 2024


#62281: Docblock improvements for WP 6.8
----------------------------+-------------------------------
 Reporter:  desrosj         |       Owner:  (none)
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  6.8
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  coding-standards
----------------------------+-------------------------------

Comment (by SergeyBiryukov):

 In [changeset:"59336" 59336]:
 {{{
 #!CommitTicketReference repository="" revision="59336"
 Docs: Add missing `void` to DocBlock `@return` types.

 This commit adds missing `void` return types to (parent) methods that can
 ''explicitly'' return `void` as one of their conditional paths.

 Addressed methods:
 * `WP_Privacy_Requests_Table::column_status()`
 * `WP_Recovery_Mode::handle_error()`
 * `WP_Widget::form()` — unlike the others, it's the ''child'' classes that
 return `void` when the method is correctly implemented.

 Note: `@return void` (where `void` is the single type returned) should not
 be used outside the default bundled themes and the PHP compatibility shims
 included in WordPress Core, as per the [https://developer.wordpress.org
 /coding-standards/inline-documentation-standards/php/ documentation
 standards].

 Follow-up to [30382], [42967], [43256], [44973], [45448].

 Props justlevine.
 See #52217, #62281.
 }}}

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


More information about the wp-trac mailing list