[wp-trac] [WordPress Trac] #27098: Bundled Themes: ditch all uses of `@return void`

WordPress Trac noreply at wordpress.org
Mon Mar 24 17:55:29 UTC 2014


#27098: Bundled Themes: ditch all uses of `@return void`
-------------------------------+---------------------
 Reporter:  philiparthurmoore  |       Owner:
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:  3.9
Component:  Bundled Theme      |     Version:  trunk
 Severity:  normal             |  Resolution:  fixed
 Keywords:  has-patch          |     Focuses:  docs
-------------------------------+---------------------

Comment (by GaryJ):

 The key document to read is https://github.com/php-fig/fig-
 standards/pull/169 (the in-progress pull request for PSR-5). It too
 RECOMMENDS that `@return void` should be used when no `return` is present,
 but I have my own view on that: http://code.garyjones.co.uk/why-return-
 void-is-wrong .

 The overridding factor here is historical precedent - while the rest of
 PHP might be using `@return void` (perhaps originating from those with a
 similar background as yours), WP was only doing so in limited
 circumstances and doing it inconsistently so the cleanest and semantically
 correct option was to not use it at all.

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


More information about the wp-trac mailing list