[wp-trac] [WordPress Trac] #32139: Add PHPDoc for all global $wp_query in /wp-includes/query.php

WordPress Trac noreply at wordpress.org
Mon Apr 27 07:56:50 UTC 2015


#32139: Add PHPDoc for all global $wp_query in /wp-includes/query.php
------------------------------------+------------------------------
 Reporter:  MikeSchinkel            |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Query                   |     Version:  trunk
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  docs
------------------------------------+------------------------------

Comment (by MikeSchinkel):

 Replying to [comment:2 jdgrimes]:
 > It only needs to be documented once aand PHPStorm will pick it up
 everywhere else.

 That is not my experience, but you may know something I do not.  I just
 verified that if I remove one of those declarations PhpStorms does not
 recognize the type for the method with the missing PHPDOc, as should be
 expected for local scoping.

 How would you document them differently?  Is there a way to set global
 scoping in one place that PhpStorm will recognize?

 > (BTW, I'd like to see `$wpdb` and other globals documented too.)

 I would too.  And I'd be happy to submit the patch(es), but I posted this
 ticket first to see if those on the core team will accept these types of
 patches. If they won't, documenting the other globals would just be a
 waste of time.

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


More information about the wp-trac mailing list