[wp-trac] [WordPress Trac] #24992: phpDoc patch for wp-admin/includes/user.php

WordPress Trac noreply at wordpress.org
Thu Aug 8 17:31:38 UTC 2013


#24992: phpDoc patch for wp-admin/includes/user.php
--------------------------+-----------------------
 Reporter:  tivnet        |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  Inline Docs   |     Version:
 Severity:  trivial       |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------
Changes (by tivnet):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 Replying to [comment:1 DrewAPicture]:
 > It's core style to delineate the return type as `object`, and use the
 description to specify the kind of object.

 First of all, if that's a "core style" then it's time to change this
 style, because modern IDE's use phpDoc to validate code and provide
 prompts. "Object" won't help.

 Besides, take a look at `get_post()` - what does it say there? Yes,
 `WP_Post`.
 `wp_insert_post` does not say `object` in @return.
 `get_page` returns `WP_Post`
 Same for `get_default_post_to_edit`
 `get_current_screen` returns `WP_Screen`

 If you are not convinced, can I ask for a second opinion?
 Thank you!

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24992#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list