[wp-trac] [WordPress Trac] #53900: Missing return types in cache

WordPress Trac noreply at wordpress.org
Mon Aug 9 11:54:22 UTC 2021


#53900: Missing return types in cache
--------------------------+------------------------------
 Reporter:  malthert      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Cache API     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:  docs
--------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => close
 * focuses:   => docs


Comment:

 Hi there, thanks for the ticket!

 Per the [https://make.wordpress.org/core/handbook/best-practices/inline-
 documentation-standards/php/#1-functions-class-methods WordPress
 documentation standards], `@return void` should not be used outside of the
 default bundled themes, so most of the core functions don't have that tag
 if the function does not return anything.

 There is an exception for functions like `wp_title()`, which can either
 return a string or display it, it which case they have `@return
 string|void`.

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


More information about the wp-trac mailing list