-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Feature Request
- Yes, I reviewed the contribution guidelines.
Describe your use case and the problem you are facing
I have been reviewing the code of the wp rewrite structure command and have run into unused $new_assoc_args variable , which looks like a residuum after past code updates:
rewrite-command/src/Rewrite_Command.php
Line 163 in 377b731
| $new_assoc_args = []; |
The variable was introduced in 3be1d98 where \WP_CLI::launch_wpcli was used for launching the flush command.
But it was later changed to WP_CLI::runcommand ( in bf6c7c0 ) which does not accept the assoc args param, and the --hard flag is being appended to the $cmd.
Keeping the $new_assoc_args variable in place makes the code less readable.
Describe the solution you'd like
Removing the $new_assoc_args variable definition and the only other usage in the code, as the variable is never really used:
rewrite-command/src/Rewrite_Command.php
Line 163 in 377b731
| $new_assoc_args = []; |
rewrite-command/src/Rewrite_Command.php
Line 167 in 377b731
| $new_assoc_args['hard'] = true; |
I'm happy to open a pull request, if we agree that this issue is valid.