Skip to content

Commit 7ecb070

Browse files
Phpcs Updates
1 parent d14aa83 commit 7ecb070

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/DB_Command.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -498,32 +498,32 @@ public function query( $args, $assoc_args ) {
498498

499499
$command = sprintf( '/usr/bin/env mysql%s --no-auto-rehash', $this->get_defaults_flag_string( $assoc_args ) );
500500
WP_CLI::debug( "Running shell command: {$command}", 'db' );
501-
501+
502502
$assoc_args['database'] = DB_NAME;
503-
503+
504504
// The query might come from STDIN.
505505
if ( ! empty( $args ) ) {
506506
$assoc_args['execute'] = $args[0];
507507
}
508-
508+
509509
if ( isset( $assoc_args['execute'] ) ) {
510510
// Ensure that the SQL mode is compatible with WPDB.
511511
$assoc_args['execute'] = $this->get_sql_mode_query( $assoc_args ) . $assoc_args['execute'];
512512
}
513-
513+
514514
$is_row_modifying_query = isset( $assoc_args['execute'] ) && preg_match( '/\b(UPDATE|DELETE|INSERT|REPLACE|LOAD DATA)\b/i', $assoc_args['execute'] );
515-
515+
516516
if ( $is_row_modifying_query ) {
517517
$assoc_args['execute'] .= '; SELECT ROW_COUNT();';
518518
}
519-
519+
520520
WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' );
521521
list( $stdout, $stderr, $exit_code ) = self::run( $command, $assoc_args, false );
522-
522+
523523
if ( $exit_code ) {
524524
WP_CLI::error( "Query failed: {$stderr}" );
525525
}
526-
526+
527527
if ( $is_row_modifying_query ) {
528528
$output_lines = explode( "\n", trim( $stdout ) );
529529
$affected_rows = (int) trim( end( $output_lines ) );

0 commit comments

Comments
 (0)