[wp-trac] [WordPress Trac] #52243: Rename `$this` when used in `@param` tags

WordPress Trac noreply at wordpress.org
Thu Jan 7 13:16:15 UTC 2021


#52243: Rename `$this` when used in `@param` tags
-------------------------+---------------------
 Reporter:  johnbillion  |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  5.7
Component:  Plugins      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  docs
-------------------------+---------------------

Comment (by audrasjb):

 Hi John, great point!

 Maybe we may also want to provide more descriptive params for
 functions/hooks that are passing `$array`.
 I found few occurrences, for example:

 In `class-requests.php`
 {{{
 /**
  * Convert a key => value array to a 'key: value' array for headers
  *
  * @param array $array Dictionary of header values
  * @return string[] List of headers
  */
 public static function flatten($array) {
 }}}

 Or maybe you'll prefer this to be another ticket :)

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


More information about the wp-trac mailing list