Skip to content

Commit d4d505f

Browse files
Update to WPCS v3 (#163)
* Update to wp-cli-tests v4 (which requires WPCS v3) * Fix all autofixable CS issues * Rename parameter --------- Co-authored-by: Pascal Birchler <pascalb@google.com>
1 parent 6eb56a9 commit d4d505f

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"require-dev": {
2424
"wp-cli/db-command": "^1.3 || ^2",
25-
"wp-cli/wp-cli-tests": "^3.1"
25+
"wp-cli/wp-cli-tests": "^4"
2626
},
2727
"config": {
2828
"process-timeout": 7200,

config-command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
return;
55
}
66

7-
$wpcli_config_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php';
7+
$wpcli_config_autoloader = __DIR__ . '/vendor/autoload.php';
88
if ( file_exists( $wpcli_config_autoloader ) ) {
99
require_once $wpcli_config_autoloader;
1010
}

src/Config_Command.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ public function is_true( $args, $assoc_args ) {
466466
WP_CLI::halt( 0 );
467467
}
468468
WP_CLI::halt( 1 );
469-
470469
}
471470

472471
/**
@@ -857,21 +856,20 @@ public function shuffle_salts( $args, $assoc_args ) {
857856
}
858857

859858
WP_CLI::success( 'Shuffled the salt keys.' );
860-
861859
}
862860

863861
/**
864862
* Filters wp-config.php file configurations.
865863
*
866-
* @param array $list
864+
* @param array $vars
867865
* @param array $previous_list
868866
* @param string $type
869867
* @param array $exclude_list
870868
* @return array
871869
*/
872-
private static function get_wp_config_diff( $list, $previous_list, $type, $exclude_list = [] ) {
870+
private static function get_wp_config_diff( $vars, $previous_list, $type, $exclude_list = [] ) {
873871
$result = [];
874-
foreach ( $list as $name => $val ) {
872+
foreach ( $vars as $name => $val ) {
875873
if ( array_key_exists( $name, $previous_list ) || in_array( $name, $exclude_list, true ) ) {
876874
continue;
877875
}

0 commit comments

Comments
 (0)