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

WordPress Trac noreply at wordpress.org
Fri Jan 8 22:38:57 UTC 2021


#52264: Rename `$array` when used in `@param` tags
-------------------------+--------------------
 Reporter:  audrasjb     |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  5.7
Component:  General      |    Version:
 Severity:  normal       |   Keywords:
  Focuses:  docs         |
-------------------------+--------------------
 Related: #52243

 Several functions, filters and actions pass `$array` as a parameter.
 Usage of `$array` in `@param` tags for actions and filters should be
 replaced with a more appropriate (and descriptive) variable name.

 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) {
 }}}
 Could be replaced with:
 {{{
 /**
  * Convert a key => value array to a 'key: value' array for headers
  *
  * @param array $headers Dictionary of header values
  * @return string[] List of headers
  */
 public static function flatten( $headers ) {
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52264>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list