@@ -1061,7 +1061,7 @@ private static function log_run_times_after_scenario( $scope ) {
10611061 $ scenario_key = self ::get_scenario_key ( $ scope );
10621062 if ( $ scenario_key ) {
10631063 self ::$ scenario_run_times [ $ scenario_key ] += microtime ( true );
1064- self ::$ scenario_count++ ;
1064+ ++ self ::$ scenario_count ;
10651065 if ( count ( self ::$ scenario_run_times ) > self ::$ num_top_scenarios ) {
10661066 arsort ( self ::$ scenario_run_times );
10671067 array_pop ( self ::$ scenario_run_times );
@@ -1094,11 +1094,9 @@ private static function dir_diff_copy( $upd_dir, $src_dir, $cop_dir ) {
10941094 throw new RuntimeException ( sprintf ( "Failed to create copy directory '%s': %s. " . __FILE__ . ': ' . __LINE__ , $ cop_file , $ error ['message ' ] ) );
10951095 }
10961096 self ::copy_dir ( $ upd_file , $ cop_file );
1097- } else {
1098- if ( ! copy ( $ upd_file , $ cop_file ) ) {
1097+ } elseif ( ! copy ( $ upd_file , $ cop_file ) ) {
10991098 $ error = error_get_last ();
11001099 throw new RuntimeException ( sprintf ( "Failed to copy '%s' to '%s': %s. " . __FILE__ . ': ' . __LINE__ , $ upd_file , $ cop_file , $ error ['message ' ] ) );
1101- }
11021100 }
11031101 } elseif ( is_dir ( $ upd_file ) ) {
11041102 self ::dir_diff_copy ( $ upd_file , $ src_file , $ cop_file );
@@ -1229,10 +1227,11 @@ private static function log_proc_method_run_time( $key, $start_time ) {
12291227 self ::$ proc_method_run_times [ $ key ] = [ 0 , 0 ];
12301228 }
12311229 self ::$ proc_method_run_times [ $ key ][0 ] += $ run_time ;
1232- self ::$ proc_method_run_times [ $ key ][1 ]++ ;
1230+ ++ self ::$ proc_method_run_times [ $ key ][1 ];
12331231 }
12341232}
12351233
1234+ // phpcs:ignore Universal.Files.SeparateFunctionsFromOO.Mixed
12361235function wp_cli_behat_env_debug ( $ message ) {
12371236 if ( ! getenv ( 'WP_CLI_TEST_DEBUG_BEHAT_ENV ' ) ) {
12381237 return ;
@@ -1301,7 +1300,6 @@ function wpcli_bootstrap_behat_feature_context() {
13011300
13021301 wp_cli_behat_env_debug ( "Project config file location: {$ project_config }" );
13031302 wp_cli_behat_env_debug ( "Project config: \n{$ contents }" );
1304-
13051303}
13061304
13071305wpcli_bootstrap_behat_feature_context ();
0 commit comments