Skip to content

Commit 7ae0201

Browse files
authored
Merge pull request #116 from wp-cli/fix/wpcs-3.0-issues
2 parents 967e9d9 + 5869f9f commit 7ae0201

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

checksum-command.php

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

7-
$wpcli_checksum_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php';
7+
$wpcli_checksum_autoloader = __DIR__ . '/vendor/autoload.php';
88
if ( file_exists( $wpcli_checksum_autoloader ) ) {
99
require_once $wpcli_checksum_autoloader;
1010
}
@@ -14,4 +14,3 @@
1414

1515
WP_CLI::add_command( 'plugin', 'Plugin_Command_Namespace' );
1616
WP_CLI::add_command( 'plugin verify-checksums', 'Checksum_Plugin_Command' );
17-

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"require-dev": {
1818
"wp-cli/extension-command": "^1.2 || ^2",
19-
"wp-cli/wp-cli-tests": "^3.1"
19+
"wp-cli/wp-cli-tests": "^4"
2020
},
2121
"config": {
2222
"process-timeout": 7200,

src/Checksum_Plugin_Command.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ public function __invoke( $args, $assoc_args ) {
101101
$version = empty( $version_arg ) ? $this->get_plugin_version( $plugin->file ) : $version_arg;
102102

103103
if ( in_array( $plugin->name, $exclude_list, true ) ) {
104-
$skips++;
104+
++$skips;
105105
continue;
106106
}
107107

108108
if ( false === $version ) {
109109
WP_CLI::warning( "Could not retrieve the version for plugin {$plugin->name}, skipping." );
110-
$skips++;
110+
++$skips;
111111
continue;
112112
}
113113

@@ -122,7 +122,7 @@ public function __invoke( $args, $assoc_args ) {
122122

123123
if ( false === $checksums ) {
124124
WP_CLI::warning( "Could not retrieve the checksums for version {$version} of plugin {$plugin->name}, skipping." );
125-
$skips++;
125+
++$skips;
126126
continue;
127127
}
128128

src/WP_CLI/Fetchers/UnfilteredPlugin.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ public function get( $name ) {
3636
return false;
3737
}
3838
}
39-

0 commit comments

Comments
 (0)