diff --git a/checksum-command.php b/checksum-command.php index be4607bea..128faf07c 100644 --- a/checksum-command.php +++ b/checksum-command.php @@ -4,7 +4,7 @@ return; } -$wpcli_checksum_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php'; +$wpcli_checksum_autoloader = __DIR__ . '/vendor/autoload.php'; if ( file_exists( $wpcli_checksum_autoloader ) ) { require_once $wpcli_checksum_autoloader; } @@ -14,4 +14,3 @@ WP_CLI::add_command( 'plugin', 'Plugin_Command_Namespace' ); WP_CLI::add_command( 'plugin verify-checksums', 'Checksum_Plugin_Command' ); - diff --git a/composer.json b/composer.json index a990818b5..95d357a18 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ }, "require-dev": { "wp-cli/extension-command": "^1.2 || ^2", - "wp-cli/wp-cli-tests": "^3.1" + "wp-cli/wp-cli-tests": "^4" }, "config": { "process-timeout": 7200, diff --git a/src/Checksum_Plugin_Command.php b/src/Checksum_Plugin_Command.php index c65a80b62..99a8b942d 100644 --- a/src/Checksum_Plugin_Command.php +++ b/src/Checksum_Plugin_Command.php @@ -101,13 +101,13 @@ public function __invoke( $args, $assoc_args ) { $version = empty( $version_arg ) ? $this->get_plugin_version( $plugin->file ) : $version_arg; if ( in_array( $plugin->name, $exclude_list, true ) ) { - $skips++; + ++$skips; continue; } if ( false === $version ) { WP_CLI::warning( "Could not retrieve the version for plugin {$plugin->name}, skipping." ); - $skips++; + ++$skips; continue; } @@ -122,7 +122,7 @@ public function __invoke( $args, $assoc_args ) { if ( false === $checksums ) { WP_CLI::warning( "Could not retrieve the checksums for version {$version} of plugin {$plugin->name}, skipping." ); - $skips++; + ++$skips; continue; } diff --git a/src/WP_CLI/Fetchers/UnfilteredPlugin.php b/src/WP_CLI/Fetchers/UnfilteredPlugin.php index 92781db5d..794ef3c53 100644 --- a/src/WP_CLI/Fetchers/UnfilteredPlugin.php +++ b/src/WP_CLI/Fetchers/UnfilteredPlugin.php @@ -36,4 +36,3 @@ public function get( $name ) { return false; } } -