[wp-trac] [WordPress Trac] #53449: Child Walker classes change the $args parameter data type and default value signatures for start_el and end_el

WordPress Trac noreply at wordpress.org
Fri Jun 18 15:54:35 UTC 2021


#53449: Child Walker classes change the $args parameter data type and default value
signatures for start_el and end_el
----------------------------+-----------------------------
 Reporter:  hellofromTonya  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:
 Severity:  normal          |   Keywords:  php8
  Focuses:                  |
----------------------------+-----------------------------
 The following Walker classes have code smells for changing the data type
 of the `$args` parameter when extending from the `Walker::start_el` and
 `end_el`:

 - `Walker_Nav_Menu`
 - `Walker_Nav_Menu_Checklist`
 - `Walker_Nav_Menu_Edit`

 What is the code smell? The parent defines the `$args` parameter as an
 `array` data type with a default value of an empty array. The child
 classes change the parameter's data type to `stdClass` with a default
 value of `null`.

 These changes need investigation to determine if these changes are needed
 and why.

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


More information about the wp-trac mailing list