@@ -184,7 +184,7 @@ class Find_Command {
184184 * @when before_wp_load
185185 */
186186 public function __invoke ( $ args , $ assoc_args ) {
187- list ( $ path ) = $ args ;
187+ list ( $ path ) = $ args ;
188188 $ this ->base_path = realpath ( $ path );
189189 if ( ! $ this ->base_path ) {
190190 WP_CLI ::error ( 'Invalid path specified. ' );
@@ -194,10 +194,10 @@ public function __invoke( $args, $assoc_args ) {
194194 $ this ->ignored_paths = array_merge ( $ this ->ignored_paths , explode ( ', ' , $ assoc_args ['include_ignored_paths ' ] ) );
195195 }
196196 $ this ->max_depth = Utils \get_flag_value ( $ assoc_args , 'max_depth ' , false );
197- $ this ->verbose = Utils \get_flag_value ( $ assoc_args , 'verbose ' );
197+ $ this ->verbose = Utils \get_flag_value ( $ assoc_args , 'verbose ' );
198198
199199 $ aliases = WP_CLI ::get_runner ()->aliases ;
200- foreach ( $ aliases as $ alias => $ target ) {
200+ foreach ( $ aliases as $ alias => $ target ) {
201201 if ( empty ( $ target ['path ' ] ) ) {
202202 continue ;
203203 }
@@ -227,13 +227,13 @@ private function recurse_directory( $path ) {
227227 // Assume base path doesn't need comparison
228228 $ compared_path = preg_replace ( '#^ ' . preg_quote ( $ this ->base_path ) . '# ' , '' , $ path );
229229 // Ignore all hidden system directories
230- $ bits = explode ( '/ ' , trim ( $ compared_path , '/ ' ) );
230+ $ bits = explode ( '/ ' , trim ( $ compared_path , '/ ' ) );
231231 $ current_dir = array_pop ( $ bits );
232232 if ( $ current_dir && '. ' === $ current_dir [0 ] ) {
233233 $ this ->log ( "Matched ignored path. Skipping recursion into ' {$ path }' " );
234234 return ;
235235 }
236- foreach ( $ this ->ignored_paths as $ ignored_path ) {
236+ foreach ( $ this ->ignored_paths as $ ignored_path ) {
237237 if ( false !== stripos ( $ compared_path , $ ignored_path ) ) {
238238 $ this ->log ( "Matched ignored path. Skipping recursion into ' {$ path }' " );
239239 return ;
@@ -245,9 +245,9 @@ private function recurse_directory( $path ) {
245245 // version.php file.
246246 if ( '/wp-includes/ ' === substr ( $ path , -13 )
247247 && file_exists ( $ path . 'version.php ' ) ) {
248- $ version_path = $ path . 'version.php ' ;
249- $ wp_path = substr ( $ path , 0 , -13 );
250- $ alias = isset ( $ this ->resolved_aliases [ $ wp_path ] ) ? $ this ->resolved_aliases [ $ wp_path ] : '' ;
248+ $ version_path = $ path . 'version.php ' ;
249+ $ wp_path = substr ( $ path , 0 , -13 );
250+ $ alias = isset ( $ this ->resolved_aliases [ $ wp_path ] ) ? $ this ->resolved_aliases [ $ wp_path ] : '' ;
251251 $ this ->found_wp [ $ version_path ] = array (
252252 'version_path ' => $ version_path ,
253253 'version ' => self ::get_wp_version ( $ version_path ),
@@ -269,12 +269,12 @@ private function recurse_directory( $path ) {
269269 // into subdirectories.
270270 try {
271271 $ iterator = new RecursiveDirectoryIterator ( $ path , FilesystemIterator::SKIP_DOTS );
272- } catch ( Exception $ e ) {
272+ } catch ( Exception $ e ) {
273273 $ this ->log ( "Exception thrown ' {$ e ->getMessage ()}'. Skipping recursion into ' {$ path }' " );
274274 return ;
275275 }
276276 $ this ->log ( "Recursing into ' {$ path }' " );
277- foreach ( $ iterator as $ file_info ) {
277+ foreach ( $ iterator as $ file_info ) {
278278 if ( $ file_info ->isDir () ) {
279279 $ this ->current_depth ++;
280280 $ this ->recurse_directory ( $ file_info ->getPathname () );
@@ -288,7 +288,7 @@ private function recurse_directory( $path ) {
288288 */
289289 private static function get_wp_version ( $ path ) {
290290 $ contents = file_get_contents ( $ path );
291- preg_match ( '#\$wp_version\s?=\s?[ \'"]([^ \'"]+)[ \'"]# ' , $ contents , $ matches );
291+ preg_match ( '#\$wp_version\s?=\s?[ \'"]([^ \'"]+)[ \'"]# ' , $ contents , $ matches );
292292 return ! empty ( $ matches [1 ] ) ? $ matches [1 ] : '' ;
293293 }
294294
@@ -309,9 +309,9 @@ private function log( $message ) {
309309 * @return string
310310 */
311311 private static function format_log_timestamp ( $ s ) {
312- $ h = floor ( $ s / 3600 );
312+ $ h = floor ( $ s / 3600 );
313313 $ s -= $ h * 3600 ;
314- $ m = floor ( $ s / 60 );
314+ $ m = floor ( $ s / 60 );
315315 $ s -= $ m * 60 ;
316316 return $ h . ': ' . sprintf ( '%02d ' , $ m ) . ': ' . sprintf ( '%02d ' , $ s );
317317 }
0 commit comments