- Issue created by @jurgenhaas
- 🇩🇪Germany mxh Offenburg
Referencing a variable in a method call and also returning that variable, is redundant.
Yes, it's redundant and could be reduced in the way that it returns the reference to the first child, but won't change the passed reference.
To achieve that, we could adopt the behavior from Drupal's NestedArray function:public static function &getValue(array &$array, array $parents, &$key_exists = NULL) { $ref = &$array;
.. where it's defining a new local reference variable and finally returns this one.
All current usages already use the returned reference. We should cover this refactor with a unit test to make sure, that this method exactly behaves as expected.
- Assigned to mxh
- 🇩🇪Germany jurgenhaas Gottmadingen
@mxh is that something for you? If not, please unassign yourself again.
- Issue was unassigned.
- Assigned to jurgenhaas
- Issue was unassigned.