Skip to content

Commit 564c2c2

Browse files
authored
Merge pull request #72 from wp-cli/fix/wpcs-3.0-issues
2 parents f14e4f2 + fb2625f commit 564c2c2

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"wp-cli/wp-cli": "^2"
1919
},
2020
"require-dev": {
21-
"wp-cli/wp-cli-tests": "^3.1"
21+
"wp-cli/wp-cli-tests": "^4"
2222
},
2323
"config": {
2424
"platform": {

find-command.php

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

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

1212
WP_CLI::add_command( 'find', 'Find_Command' );
13-

src/Find_Command.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,9 @@ private function recurse_directory( $path ) {
310310
$this->log( "Recursing into '{$path}'" );
311311
foreach ( $iterator as $file_info ) {
312312
if ( $file_info->isDir() ) {
313-
$this->current_depth++;
313+
++$this->current_depth;
314314
$this->recurse_directory( $file_info->getPathname() );
315-
$this->current_depth--;
315+
--$this->current_depth;
316316
}
317317
}
318318
}
@@ -368,5 +368,4 @@ private static function format_log_timestamp( $s ) {
368368
$s -= $m * 60;
369369
return $h . ':' . sprintf( '%02d', $m ) . ':' . sprintf( '%02d', $s );
370370
}
371-
372371
}

0 commit comments

Comments
 (0)