Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions php/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ static function ( $arg ) {
break;
}
}
return $arg;
return $arg;
},
$argv
);
Expand Down Expand Up @@ -1411,8 +1411,8 @@ function glob_brace( $pattern, $dummy_flags = null ) { // phpcs:ignore Generic.C
// For each comma-separated subpattern.
do {
$subpattern = substr( $pattern, 0, $begin )
. substr( $pattern, $p, $next - $p )
. substr( $pattern, $rest + 1 );
. substr( $pattern, $p, $next - $p )
. substr( $pattern, $rest + 1 );

$result = glob_brace( $subpattern );
if ( ! empty( $result ) ) {
Expand Down Expand Up @@ -1889,10 +1889,6 @@ function get_mysql_binary_path() {
$path = $mariadb_binary;
}

if ( '' === $path ) {
WP_CLI::Error( 'Could not find mysql binary' );
}

return $path;
}

Expand Down Expand Up @@ -1927,19 +1923,19 @@ function get_mysql_version() {
}

/**
* Returns the correct `dump` command based on the detected database type.
*
* @return string The appropriate dump command.
*/
* Returns the correct `dump` command based on the detected database type.
*
* @return string The appropriate dump command.
*/
function get_sql_dump_command() {
return 'mariadb' === get_db_type() ? 'mariadb-dump' : 'mysqldump';
}

/**
* Returns the correct `check` command based on the detected database type.
*
* @return string The appropriate check command.
*/
* Returns the correct `check` command based on the detected database type.
*
* @return string The appropriate check command.
*/
function get_sql_check_command() {
return 'mariadb' === get_db_type() ? 'mariadb-check' : 'mysqlcheck';
}
Expand Down