You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
Feature Request
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
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
rewrite-command/src/Rewrite_Command.php
Line 167 in 377b731
I'm happy to open a pull request, if we agree that this issue is valid.
The text was updated successfully, but these errors were encountered: