Replace isset with null-coalesce everywhere for consistency

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2022-02-13 22:44:10 +00:00
parent d93a816691
commit 39e64092b7

View File

@ -840,11 +840,7 @@ class ExportSql extends ExportPlugin
$dbAlias = $db;
}
if (isset($GLOBALS['sql_compatibility'])) {
$compat = $GLOBALS['sql_compatibility'];
} else {
$compat = 'NONE';
}
$compat = $GLOBALS['sql_compatibility'] ?? 'NONE';
if (isset($GLOBALS['sql_drop_database'])) {
if (
@ -928,11 +924,7 @@ class ExportSql extends ExportPlugin
$dbAlias = $db;
}
if (isset($GLOBALS['sql_compatibility'])) {
$compat = $GLOBALS['sql_compatibility'];
} else {
$compat = 'NONE';
}
$compat = $GLOBALS['sql_compatibility'] ?? 'NONE';
$head = $this->exportComment()
. $this->exportComment(
@ -1363,11 +1355,7 @@ class ExportSql extends ExportPlugin
$createQuery .= $crlf . ')' . ($addSemicolon ? ';' : '') . $crlf;
if (isset($GLOBALS['sql_compatibility'])) {
$compat = $GLOBALS['sql_compatibility'];
} else {
$compat = 'NONE';
}
$compat = $GLOBALS['sql_compatibility'] ?? 'NONE';
if ($compat === 'MSSQL') {
$createQuery = $this->makeCreateTableMSSQLCompatible($createQuery);
@ -1422,11 +1410,7 @@ class ExportSql extends ExportPlugin
$schemaCreate = '';
$newCrlf = $crlf;
if (isset($GLOBALS['sql_compatibility'])) {
$compat = $GLOBALS['sql_compatibility'];
} else {
$compat = 'NONE';
}
$compat = $GLOBALS['sql_compatibility'] ?? 'NONE';
$result = $GLOBALS['dbi']->tryQuery(
'SHOW TABLE STATUS FROM ' . Util::backquote($db)
@ -2046,11 +2030,7 @@ class ExportSql extends ExportPlugin
$dbAlias = $db;
$tableAlias = $table;
$this->initAlias($aliases, $dbAlias, $tableAlias);
if (isset($GLOBALS['sql_compatibility'])) {
$compat = $GLOBALS['sql_compatibility'];
} else {
$compat = 'NONE';
}
$compat = $GLOBALS['sql_compatibility'] ?? 'NONE';
$formattedTableName = Util::backquoteCompat($tableAlias, $compat, isset($GLOBALS['sql_backquotes']));
$dump = $this->possibleCRLF()