Skip to content

Commit

Permalink
Merge pull request #72 from wp-cli/fix/wpcs-3.0-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Aug 31, 2023
2 parents f14e4f2 + fb2625f commit 564c2c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"wp-cli/wp-cli": "^2"
},
"require-dev": {
"wp-cli/wp-cli-tests": "^3.1"
"wp-cli/wp-cli-tests": "^4"
},
"config": {
"platform": {
Expand Down
3 changes: 1 addition & 2 deletions find-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
return;
}

$wpcli_find_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php';
$wpcli_find_autoloader = __DIR__ . '/vendor/autoload.php';
if ( file_exists( $wpcli_find_autoloader ) ) {
require_once $wpcli_find_autoloader;
}

WP_CLI::add_command( 'find', 'Find_Command' );

5 changes: 2 additions & 3 deletions src/Find_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ private function recurse_directory( $path ) {
$this->log( "Recursing into '{$path}'" );
foreach ( $iterator as $file_info ) {
if ( $file_info->isDir() ) {
$this->current_depth++;
++$this->current_depth;
$this->recurse_directory( $file_info->getPathname() );
$this->current_depth--;
--$this->current_depth;
}
}
}
Expand Down Expand Up @@ -368,5 +368,4 @@ private static function format_log_timestamp( $s ) {
$s -= $m * 60;
return $h . ':' . sprintf( '%02d', $m ) . ':' . sprintf( '%02d', $s );
}

}

0 comments on commit 564c2c2

Please sign in to comment.