[wp-trac] [WordPress Trac] #27098: Twenty Fourteen: Ditch all uses of `@return void`.

WordPress Trac noreply at wordpress.org
Wed Feb 12 00:51:40 UTC 2014


#27098: Twenty Fourteen: Ditch all uses of `@return void`.
-------------------------------+------------------------------
 Reporter:  philiparthurmoore  |       Owner:
     Type:  defect (bug)       |      Status:  reopened
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Bundled Theme      |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:  docs
-------------------------------+------------------------------

Comment (by nacin):

 I don't know if it's worth patching older themes for it, but in general
 I'd follow core.

 The basic argument for omitting @return void, for what it's worth, is
 rooted in the fact that we're always backwards compatible. For us,
 changing the return value of a function is pretty much a no-no. However, I
 have no qualms with adding a return value to a function that didn't have
 one previously, and we've done that a number of times. To me, @return void
 "bakes in" that the function returns no value, making it explicit. It's
 also possible to have the opposite feeling: that @return void specifically
 tells developers to not rely on a return value, at least until further
 notice. You could see it both ways.

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


More information about the wp-trac mailing list