coding-standard
coding-standard copied to clipboard
[UnusedVariable] Add setting to ignore destructuring
I know that PHP supports skipping elements when destructuring from an array:
$array = [1, 2, 3];
[, , $c] = $array;
However, I often find it nice to have named variables for destructuring even if they aren't all used.
Can we add a new setting for that rule similar to ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach
that allows ignoring unused variables in destructuring?