";
$iClass = '';
diff --git a/libraries/classes/Navigation/Nodes/NodeDatabaseChildContainer.php b/libraries/classes/Navigation/Nodes/NodeDatabaseChildContainer.php
index 994de817b0..53853bffcd 100644
--- a/libraries/classes/Navigation/Nodes/NodeDatabaseChildContainer.php
+++ b/libraries/classes/Navigation/Nodes/NodeDatabaseChildContainer.php
@@ -27,9 +27,7 @@ abstract class NodeDatabaseChildContainer extends NodeDatabaseChild
parent::__construct($name, $type);
if ($GLOBALS['cfg']['NavigationTreeEnableGrouping']) {
$this->separator = $GLOBALS['cfg']['NavigationTreeTableSeparator'];
- $this->separator_depth = (int) (
- $GLOBALS['cfg']['NavigationTreeTableLevel']
- );
+ $this->separator_depth = (int) $GLOBALS['cfg']['NavigationTreeTableLevel'];
}
}
diff --git a/libraries/classes/Plugins/Export/ExportSql.php b/libraries/classes/Plugins/Export/ExportSql.php
index bd89b65766..eb1b00d63d 100644
--- a/libraries/classes/Plugins/Export/ExportSql.php
+++ b/libraries/classes/Plugins/Export/ExportSql.php
@@ -749,8 +749,8 @@ class ExportSql extends ExportPlugin
// We want exported AUTO_INCREMENT columns to have still same value,
// do this only for recent MySQL exports
- if ((! isset($GLOBALS['sql_compatibility'])
- || $GLOBALS['sql_compatibility'] == 'NONE')
+ if (! isset($GLOBALS['sql_compatibility'])
+ || $GLOBALS['sql_compatibility'] == 'NONE'
) {
$head .= 'SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";' . $crlf;
}
@@ -1794,7 +1794,7 @@ class ExportSql extends ExportPlugin
) . $alter_footer;
}
- if (! empty($indexes) || (! empty($indexes_fulltext))) {
+ if (! empty($indexes) || ! empty($indexes_fulltext)) {
$sql_indexes = $this->generateComment(
$crlf,
$sql_indexes,
@@ -1813,7 +1813,7 @@ class ExportSql extends ExportPlugin
}
// Generating auto-increment-related query.
- if (! empty($auto_increment) && ($update_indexes_increments)) {
+ if (! empty($auto_increment) && $update_indexes_increments) {
$sql_auto_increments_query = $alter_header . $crlf . ' MODIFY '
. implode(',' . $crlf . ' MODIFY ', $auto_increment);
if (isset($GLOBALS['sql_auto_increment'])
@@ -2827,9 +2827,9 @@ class ExportSql extends ExportPlugin
}
if ($statement->options->has('TRIGGER')
- || ($statement->options->has('PROCEDURE'))
- || ($statement->options->has('FUNCTION'))
- || ($statement->options->has('VIEW'))
+ || $statement->options->has('PROCEDURE')
+ || $statement->options->has('FUNCTION')
+ || $statement->options->has('VIEW')
) {
// Repalcing the body.
for ($i = 0, $count = count($statement->body); $i < $count; ++$i) {
diff --git a/libraries/classes/Plugins/Export/ExportXml.php b/libraries/classes/Plugins/Export/ExportXml.php
index 01a4e5d0b1..9696f519a7 100644
--- a/libraries/classes/Plugins/Export/ExportXml.php
+++ b/libraries/classes/Plugins/Export/ExportXml.php
@@ -253,7 +253,7 @@ class ExportXml extends ExportPlugin
. '-->' . $crlf . $crlf;
$head .= '
' . $crlf;
diff --git a/libraries/classes/Plugins/Export/Helpers/Pdf.php b/libraries/classes/Plugins/Export/Helpers/Pdf.php
index 0601d2271c..73c57799c2 100644
--- a/libraries/classes/Plugins/Export/Helpers/Pdf.php
+++ b/libraries/classes/Plugins/Export/Helpers/Pdf.php
@@ -113,7 +113,7 @@ class Pdf extends PdfLib
$current_page = $this->page;
if ((($y + $h) > $this->PageBreakTrigger)
&& (! $this->InFooter)
- && ($this->AcceptPageBreak())
+ && $this->AcceptPageBreak()
) {
if ($addpage) {
//Automatic page break
diff --git a/libraries/classes/Plugins/Import/ImportSql.php b/libraries/classes/Plugins/Import/ImportSql.php
index f7e43f29ac..1dc62e5963 100644
--- a/libraries/classes/Plugins/Import/ImportSql.php
+++ b/libraries/classes/Plugins/Import/ImportSql.php
@@ -160,7 +160,7 @@ class ImportSql extends ImportPlugin
}
// Extracting remaining statements.
- while ((! $error) && (! $timeout_passed) && (! empty($bq->query))) {
+ while (! $error && ! $timeout_passed && ! empty($bq->query)) {
$statement = $bq->extract(true);
if (! empty($statement)) {
$this->import->runQuery($statement, $statement, $sql_data);
diff --git a/libraries/classes/Plugins/Schema/Pdf/PdfRelationSchema.php b/libraries/classes/Plugins/Schema/Pdf/PdfRelationSchema.php
index 47afe14b75..71a7ca24f6 100644
--- a/libraries/classes/Plugins/Schema/Pdf/PdfRelationSchema.php
+++ b/libraries/classes/Plugins/Schema/Pdf/PdfRelationSchema.php
@@ -768,18 +768,18 @@ class PdfRelationSchema extends ExportRelationSchema
$field_name,
$type,
$attribute,
- (($row['Null'] == '' || $row['Null'] == 'NO')
+ ($row['Null'] == '' || $row['Null'] == 'NO')
? __('No')
- : __('Yes')),
- (isset($row['Default']) ? $row['Default'] : ''),
+ : __('Yes'),
+ isset($row['Default']) ? $row['Default'] : '',
$row['Extra'],
$linksTo,
- (isset($comments[$field_name])
+ isset($comments[$field_name])
? $comments[$field_name]
- : ''),
- (isset($mime_map) && isset($mime_map[$field_name])
+ : '',
+ isset($mime_map) && isset($mime_map[$field_name])
? str_replace('_', '/', $mime_map[$field_name]['mimetype'])
- : ''),
+ : '',
];
$links = [];
$links[0] = $this->diagram->PMA_links['RT'][$table][$field_name];
diff --git a/libraries/classes/Plugins/Transformations/Input/Text_Plain_Iptobinary.php b/libraries/classes/Plugins/Transformations/Input/Text_Plain_Iptobinary.php
index ad7a91f972..b504cac82e 100644
--- a/libraries/classes/Plugins/Transformations/Input/Text_Plain_Iptobinary.php
+++ b/libraries/classes/Plugins/Transformations/Input/Text_Plain_Iptobinary.php
@@ -101,7 +101,7 @@ class Text_Plain_Iptobinary extends IOTransformationsPlugin
. ' size="40"'
. ' dir="' . $text_dir . '"'
. ' class="' . $class . '"'
- . ' id="field_' . ($idindex) . '_3"'
+ . ' id="field_' . $idindex . '_3"'
. ' tabindex="' . ($tabindex + $tabindex_for_value) . '">';
return $html;
diff --git a/libraries/classes/Relation.php b/libraries/classes/Relation.php
index a9a2a13cfb..efa38381ea 100644
--- a/libraries/classes/Relation.php
+++ b/libraries/classes/Relation.php
@@ -91,7 +91,7 @@ class Relation
public function getRelationsParam()
{
if (empty($_SESSION['relation'][$GLOBALS['server']])
- || (empty($_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION']))
+ || empty($_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'])
|| $_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'] != PMA_VERSION
) {
$_SESSION['relation'][$GLOBALS['server']] = $this->checkRelationsParam();
diff --git a/libraries/classes/ReplicationGui.php b/libraries/classes/ReplicationGui.php
index eb284c5a65..1e3db907db 100644
--- a/libraries/classes/ReplicationGui.php
+++ b/libraries/classes/ReplicationGui.php
@@ -748,7 +748,7 @@ class ReplicationGui
'',
mb_substr(
$_current_user,
- (mb_strrpos($_current_user, '@') + 1)
+ mb_strrpos($_current_user, '@') + 1
)
);
if ($thishost != 'localhost' && $thishost != '127.0.0.1') {
diff --git a/libraries/classes/Rte/Footer.php b/libraries/classes/Rte/Footer.php
index fd11484677..98fc213684 100644
--- a/libraries/classes/Rte/Footer.php
+++ b/libraries/classes/Rte/Footer.php
@@ -125,12 +125,12 @@ class Footer
0 => [
'label' => __('OFF'),
'value' => "SET GLOBAL event_scheduler=\"OFF\"",
- 'selected' => ($es_state != 'on'),
+ 'selected' => $es_state != 'on',
],
1 => [
'label' => __('ON'),
'value' => "SET GLOBAL event_scheduler=\"ON\"",
- 'selected' => ($es_state == 'on'),
+ 'selected' => $es_state == 'on',
],
];
// Generate output
diff --git a/libraries/classes/Rte/Routines.php b/libraries/classes/Rte/Routines.php
index 16acf5f91e..8d3f6978e1 100644
--- a/libraries/classes/Rte/Routines.php
+++ b/libraries/classes/Rte/Routines.php
@@ -1599,7 +1599,7 @@ class Routines
echo $form;
}
exit;
- } elseif (($response->isAjax())) {
+ } elseif ($response->isAjax()) {
$message = __('Error in processing request:') . ' ';
$message .= sprintf(
$this->words->get('not_found'),
diff --git a/libraries/classes/Server/Privileges.php b/libraries/classes/Server/Privileges.php
index 48c3164bdd..61f40ebd4c 100644
--- a/libraries/classes/Server/Privileges.php
+++ b/libraries/classes/Server/Privileges.php
@@ -782,12 +782,11 @@ class Privileges
'Does not require SSL-encrypted connections.'
),
'label' => 'REQUIRE NONE',
- 'checked' => (isset($row['ssl_type'])
+ 'checked' => isset($row['ssl_type'])
&& ($row['ssl_type'] == 'NONE'
|| $row['ssl_type'] == '')
? 'checked="checked"'
- : ''
- ),
+ : '',
'disabled' => false,
'radio' => true,
],
@@ -798,10 +797,9 @@ class Privileges
'Requires SSL-encrypted connections.'
),
'label' => 'REQUIRE SSL',
- 'checked' => (isset($row['ssl_type']) && ($row['ssl_type'] == 'ANY')
+ 'checked' => isset($row['ssl_type']) && ($row['ssl_type'] == 'ANY')
? 'checked="checked"'
- : ''
- ),
+ : '',
'disabled' => false,
'radio' => true,
],
@@ -812,10 +810,9 @@ class Privileges
'Requires a valid X509 certificate.'
),
'label' => 'REQUIRE X509',
- 'checked' => (isset($row['ssl_type']) && ($row['ssl_type'] == 'X509')
+ 'checked' => isset($row['ssl_type']) && ($row['ssl_type'] == 'X509')
? 'checked="checked"'
- : ''
- ),
+ : '',
'disabled' => false,
'radio' => true,
],
@@ -824,15 +821,14 @@ class Privileges
'value' => 'SPECIFIED',
'description' => '',
'label' => 'SPECIFIED',
- 'checked' => ($specified ? 'checked="checked"' : ''),
+ 'checked' => $specified ? 'checked="checked"' : '',
'disabled' => false,
'radio' => true,
],
[
'name' => 'ssl_cipher',
- 'value' => (isset($row['ssl_cipher'])
- ? htmlspecialchars($row['ssl_cipher']) : ''
- ),
+ 'value' => isset($row['ssl_cipher'])
+ ? htmlspecialchars($row['ssl_cipher']) : '',
'description' => __(
'Requires that a specific cipher method be used for a connection.'
),
@@ -843,9 +839,8 @@ class Privileges
],
[
'name' => 'x509_issuer',
- 'value' => (isset($row['x509_issuer'])
- ? htmlspecialchars($row['x509_issuer']) : ''
- ),
+ 'value' => isset($row['x509_issuer'])
+ ? htmlspecialchars($row['x509_issuer']) : '',
'description' => __(
'Requires that a valid X509 certificate issued by this CA be presented.'
),
@@ -856,9 +851,8 @@ class Privileges
],
[
'name' => 'x509_subject',
- 'value' => (isset($row['x509_subject'])
- ? htmlspecialchars($row['x509_subject']) : ''
- ),
+ 'value' => isset($row['x509_subject'])
+ ? htmlspecialchars($row['x509_subject']) : '',
'description' => __(
'Requires that a valid X509 certificate with this subject be presented.'
),
@@ -887,7 +881,7 @@ class Privileges
[
'input_name' => 'max_questions',
'name_main' => 'MAX QUERIES PER HOUR',
- 'value' => (isset($row['max_questions']) ? $row['max_questions'] : '0'),
+ 'value' => isset($row['max_questions']) ? $row['max_questions'] : '0',
'description' => __(
'Limits the number of queries the user may send to the server per hour.'
),
@@ -895,7 +889,7 @@ class Privileges
[
'input_name' => 'max_updates',
'name_main' => 'MAX UPDATES PER HOUR',
- 'value' => (isset($row['max_updates']) ? $row['max_updates'] : '0'),
+ 'value' => isset($row['max_updates']) ? $row['max_updates'] : '0',
'description' => __(
'Limits the number of commands that change any table '
. 'or database the user may execute per hour.'
@@ -904,7 +898,7 @@ class Privileges
[
'input_name' => 'max_connections',
'name_main' => 'MAX CONNECTIONS PER HOUR',
- 'value' => (isset($row['max_connections']) ? $row['max_connections'] : '0'),
+ 'value' => isset($row['max_connections']) ? $row['max_connections'] : '0',
'description' => __(
'Limits the number of new connections the user may open per hour.'
),
@@ -912,8 +906,8 @@ class Privileges
[
'input_name' => 'max_user_connections',
'name_main' => 'MAX USER_CONNECTIONS',
- 'value' => (isset($row['max_user_connections']) ?
- $row['max_user_connections'] : '0'),
+ 'value' => isset($row['max_user_connections']) ?
+ $row['max_user_connections'] : '0',
'description' => __(
'Limits the number of simultaneous connections '
. 'the user may have.'
@@ -1184,7 +1178,7 @@ class Privileges
. mb_substr(
$tmp_current_grant,
0,
- (mb_strlen($tmp_current_grant) - 5)
+ mb_strlen($tmp_current_grant) - 5
);
$html_output .= (isset($GLOBALS[$privGlobalName])
? $GLOBALS[$privGlobalName]
@@ -1340,10 +1334,9 @@ class Privileges
[
'Create',
'CREATE',
- ($table == '*'
+ $table == '*'
? __('Allows creating new databases and tables.')
- : __('Allows creating new tables.')
- ),
+ : __('Allows creating new tables.'),
],
[
'Alter',
@@ -1358,10 +1351,9 @@ class Privileges
[
'Drop',
'DROP',
- ($table == '*'
+ $table == '*'
? __('Allows dropping databases and tables.')
- : __('Allows dropping tables.')
- ),
+ : __('Allows dropping tables.'),
],
[
'Create_tmp_table',
@@ -1698,7 +1690,7 @@ class Privileges
'',
mb_substr(
$_current_user,
- (mb_strrpos($_current_user, '@') + 1)
+ mb_strrpos($_current_user, '@') + 1
)
);
if ($thishost != 'localhost' && $thishost != '127.0.0.1') {
@@ -3149,7 +3141,7 @@ class Privileges
}
$new_user_string .= '';
- if ((isset($_POST['Grant_priv']) && $_POST['Grant_priv'] == 'Y')) {
+ if (isset($_POST['Grant_priv']) && $_POST['Grant_priv'] == 'Y') {
$new_user_string .= __('Yes');
} else {
$new_user_string .= __('No');
@@ -4336,7 +4328,7 @@ class Privileges
$_user_name = $this->dbi->fetchValue('SELECT USER()');
$hostname = mb_substr(
$_user_name,
- (mb_strrpos($_user_name, '@') + 1)
+ mb_strrpos($_user_name, '@') + 1
);
unset($_user_name);
break;
diff --git a/libraries/classes/Server/Status/Data.php b/libraries/classes/Server/Status/Data.php
index 62336d4982..078ff0c899 100644
--- a/libraries/classes/Server/Status/Data.php
+++ b/libraries/classes/Server/Status/Data.php
@@ -206,7 +206,7 @@ class Data
];
$links['innodb']['doc'] = 'innodb';
- return($links);
+ return $links;
}
/**
diff --git a/libraries/classes/Server/Status/Processes.php b/libraries/classes/Server/Status/Processes.php
index bfd1e103e6..6926d76082 100644
--- a/libraries/classes/Server/Status/Processes.php
+++ b/libraries/classes/Server/Status/Processes.php
@@ -133,7 +133,7 @@ class Processes
: 'SHOW PROCESSLIST';
if ((! empty($_POST['order_by_field'])
&& ! empty($_POST['sort_order']))
- || (! empty($_POST['showExecuting']))
+ || ! empty($_POST['showExecuting'])
) {
$sql_query = 'SELECT * FROM `INFORMATION_SCHEMA`.`PROCESSLIST` ';
}
@@ -241,11 +241,11 @@ class Processes
$url_params = [
'ajax_request' => true,
- 'full' => (isset($_POST['full']) ? $_POST['full'] : ''),
- 'column_name' => (isset($_POST['column_name']) ? $_POST['column_name'] : ''),
+ 'full' => isset($_POST['full']) ? $_POST['full'] : '',
+ 'column_name' => isset($_POST['column_name']) ? $_POST['column_name'] : '',
'order_by_field'
- => (isset($_POST['order_by_field']) ? $_POST['order_by_field'] : ''),
- 'sort_order' => (isset($_POST['sort_order']) ? $_POST['sort_order'] : ''),
+ => isset($_POST['order_by_field']) ? $_POST['order_by_field'] : '',
+ 'sort_order' => isset($_POST['sort_order']) ? $_POST['sort_order'] : '',
];
$retval = '';
@@ -280,7 +280,7 @@ class Processes
// Array keys need to modify due to the way it has used
// to display column values
if ((! empty($_POST['order_by_field']) && ! empty($_POST['sort_order']))
- || (! empty($_POST['showExecuting']))
+ || ! empty($_POST['showExecuting'])
) {
foreach (array_keys($process) as $key) {
$new_key = ucfirst(mb_strtolower($key));
diff --git a/libraries/classes/Sql.php b/libraries/classes/Sql.php
index 982ae666c0..da5d89b677 100644
--- a/libraries/classes/Sql.php
+++ b/libraries/classes/Sql.php
@@ -526,7 +526,7 @@ class Sql
&& $analyzed_sql_results['select_from']
&& isset($analyzed_sql_results['select_expr'])
&& isset($analyzed_sql_results['select_tables'])
- && ((empty($analyzed_sql_results['select_expr']))
+ && (empty($analyzed_sql_results['select_expr'])
|| ((count($analyzed_sql_results['select_expr']) == 1)
&& ($analyzed_sql_results['select_expr'][0] == '*')))
&& count($analyzed_sql_results['select_tables']) == 1;
@@ -979,7 +979,7 @@ class Sql
private function getNumberOfRowsAffectedOrChanged($is_affected, $result)
{
if (! $is_affected) {
- $num_rows = ($result) ? @$GLOBALS['dbi']->numRows($result) : 0;
+ $num_rows = $result ? @$GLOBALS['dbi']->numRows($result) : 0;
} else {
$num_rows = @$GLOBALS['dbi']->affectedRows();
}
diff --git a/libraries/classes/Tracker.php b/libraries/classes/Tracker.php
index bf44b6b8dc..b846f892c1 100644
--- a/libraries/classes/Tracker.php
+++ b/libraries/classes/Tracker.php
@@ -287,7 +287,7 @@ class Tracker
if ($result) {
// Deactivate previous version
- self::deactivateTracking($dbname, $tablename, ($version - 1));
+ self::deactivateTracking($dbname, $tablename, $version - 1);
}
return $result;
diff --git a/libraries/classes/Tracking.php b/libraries/classes/Tracking.php
index 1244f1ae83..3c78a3e4c1 100644
--- a/libraries/classes/Tracking.php
+++ b/libraries/classes/Tracking.php
@@ -80,7 +80,7 @@ class Tracking
}
$id++;
}
- return($tmp_entries);
+ return $tmp_entries;
}
/**
@@ -175,7 +175,7 @@ class Tracking
) {
$selectableTablesSqlResult = $this->getSqlResultForSelectableTables();
$selectableTablesEntries = [];
- while (($entry = $GLOBALS['dbi']->fetchArray($selectableTablesSqlResult))) {
+ while ($entry = $GLOBALS['dbi']->fetchArray($selectableTablesSqlResult)) {
$entry['is_tracked'] = Tracker::isTracked(
$entry['db_name'],
$entry['table_name']
@@ -649,7 +649,7 @@ class Tracking
$entry['url_params'] = Url::getCommon($urlParams + [
'report' => 'true',
'version' => $_POST['version'],
- $deleteParam => ($lineNumber - $offset),
+ $deleteParam => $lineNumber - $offset,
], '');
$entry['line_number'] = $lineNumber;
$entries[] = $entry;
@@ -1256,7 +1256,7 @@ class Tracking
$sep = $GLOBALS['cfg']['NavigationTreeTableSeparator'];
foreach ($table_list as $key => $value) {
- if (is_array($value) && array_key_exists(('is' . $sep . 'group'), $value)
+ if (is_array($value) && array_key_exists('is' . $sep . 'group', $value)
&& $value['is' . $sep . 'group']
) {
$untracked_tables = array_merge($this->extractTableNames($value, $db), $untracked_tables); //Recursion step
@@ -1299,12 +1299,12 @@ class Tracking
0 => [
'label' => __('not active'),
'value' => 'deactivate_now',
- 'selected' => ($state != 'active'),
+ 'selected' => $state != 'active',
],
1 => [
'label' => __('active'),
'value' => 'activate_now',
- 'selected' => ($state == 'active'),
+ 'selected' => $state == 'active',
],
];
$link = 'tbl_tracking.php' . $urlQuery . '&table='
diff --git a/libraries/classes/UserPassword.php b/libraries/classes/UserPassword.php
index eb47a16e6e..7c57844089 100644
--- a/libraries/classes/UserPassword.php
+++ b/libraries/classes/UserPassword.php
@@ -78,7 +78,7 @@ class UserPassword
$error = false;
$message = Message::success(__('The profile has been updated.'));
- if (($_POST['nopass'] != '1')) {
+ if ($_POST['nopass'] != '1') {
if (strlen($_POST['pma_pw']) === 0 || strlen($_POST['pma_pw2']) === 0) {
$message = Message::error(__('The password is empty!'));
$error = true;
diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php
index e79dd3b7b2..c20230460d 100644
--- a/libraries/classes/Util.php
+++ b/libraries/classes/Util.php
@@ -564,7 +564,7 @@ class Util
}
// Finding the query that failed, if not specified.
- if ((empty($sql_query) && (! empty($GLOBALS['sql_query'])))) {
+ if (empty($sql_query) && ! empty($GLOBALS['sql_query'])) {
$sql_query = $GLOBALS['sql_query'];
}
$sql_query = trim($sql_query);
@@ -599,7 +599,7 @@ class Util
// For security reasons, if the MySQL refuses the connection, the query
// is hidden so no details are revealed.
- if ((! empty($sql_query)) && (! (mb_strstr($sql_query, 'connect')))) {
+ if (! empty($sql_query) && ! mb_strstr($sql_query, 'connect')) {
// Static analysis errors.
if (! empty($errors)) {
$error_msg .= ' ' . __('Static analysis:')
@@ -1488,7 +1488,7 @@ class Util
if ($originalValue != 0 && floatval($value) == 0) {
return ' <' . number_format(
- (1 / pow(10, $digits_right)),
+ 1 / pow(10, $digits_right),
$digits_right,
$decimal_sep,
$thousands_sep
@@ -1999,7 +1999,7 @@ class Util
if (! empty($analyzed_sql_results['statement']->expr)) {
foreach ($analyzed_sql_results['statement']->expr as $expr) {
- if ((empty($expr->alias)) || (empty($expr->column))) {
+ if (empty($expr->alias) || empty($expr->column)) {
continue;
}
if (strcasecmp($meta->name, $expr->alias) == 0) {
@@ -2130,7 +2130,7 @@ class Util
}
$where_clause = trim(preg_replace('|\s?AND$|', '', $preferred_condition));
- return([$where_clause, $clause_is_unique, $condition_array]);
+ return [$where_clause, $clause_is_unique, $condition_array];
} // end function
/**
@@ -4625,7 +4625,7 @@ class Util
$GLOBALS['dbi']->getTablesFull(
$db,
$groupWithSeparator,
- ($groupWithSeparator !== false),
+ $groupWithSeparator !== false,
$limit_offset,
$limit_count,
$sort,
diff --git a/libraries/classes/ZipExtension.php b/libraries/classes/ZipExtension.php
index 0dfb01de4f..a985e06fac 100644
--- a/libraries/classes/ZipExtension.php
+++ b/libraries/classes/ZipExtension.php
@@ -57,7 +57,7 @@ class ZipExtension
if ($this->zip->numFiles === 0) {
$error_message = __('No files found inside ZIP archive!');
$this->zip->close();
- return (['error' => $error_message, 'data' => $file_data]);
+ return ['error' => $error_message, 'data' => $file_data];
}
/* Is the the zip really an ODS file? */
@@ -70,7 +70,7 @@ class ZipExtension
if (! isset($specific_entry)) {
$file_data = $first_zip_entry;
$this->zip->close();
- return (['error' => $error_message, 'data' => $file_data]);
+ return ['error' => $error_message, 'data' => $file_data];
}
/* Return the correct contents, not just the first entry */
@@ -88,11 +88,11 @@ class ZipExtension
}
$this->zip->close();
- return (['error' => $error_message, 'data' => $file_data]);
+ return ['error' => $error_message, 'data' => $file_data];
} else {
$error_message = __('Error in ZIP archive:') . ' ' . $this->zip->getStatusString();
$this->zip->close();
- return (['error' => $error_message, 'data' => $file_data]);
+ return ['error' => $error_message, 'data' => $file_data];
}
}
diff --git a/libraries/tbl_columns_definition_form.inc.php b/libraries/tbl_columns_definition_form.inc.php
index 5d3d86a123..78b67eb5af 100644
--- a/libraries/tbl_columns_definition_form.inc.php
+++ b/libraries/tbl_columns_definition_form.inc.php
@@ -504,9 +504,8 @@ $html = $template->render('columns_definitions/column_definitions_form', [
'max_rows' => intval($GLOBALS['cfg']['MaxRows']),
'char_editing' => isset($GLOBALS['cfg']['CharEditing']) ? $GLOBALS['cfg']['CharEditing'] : null,
'attribute_types' => $GLOBALS['dbi']->types->getAttributes(),
- 'privs_available' => (isset($GLOBALS['col_priv']) ? $GLOBALS['col_priv'] : false
- && isset($GLOBALS['is_reload_priv']) ? $GLOBALS['is_reload_priv'] : false
- ),
+ 'privs_available' => isset($GLOBALS['col_priv']) ? $GLOBALS['col_priv'] : false
+ && isset($GLOBALS['is_reload_priv']) ? $GLOBALS['is_reload_priv'] : false,
'max_length' => $GLOBALS['dbi']->getVersion() >= 50503 ? 1024 : 255,
'have_partitioning' => Partition::havePartitioning(),
'dbi' => $GLOBALS['dbi'],
diff --git a/libraries/user_preferences.inc.php b/libraries/user_preferences.inc.php
index 921506c423..5e8e0d0c1d 100644
--- a/libraries/user_preferences.inc.php
+++ b/libraries/user_preferences.inc.php
@@ -47,7 +47,7 @@ foreach (UserFormList::getAll() as $formset) {
'link' => 'prefs_forms.php',
'text' => $formset_class::getName(),
'icon' => $tabs_icons[$formset],
- 'active' => ($script_name == 'prefs_forms.php' && $formset == $form_param),
+ 'active' => $script_name == 'prefs_forms.php' && $formset == $form_param,
];
$content .= Util::getHtmlTab($tab, ['form' => $formset]) . "\n";
}
diff --git a/tbl_export.php b/tbl_export.php
index 68c7c47dc6..c815b99986 100644
--- a/tbl_export.php
+++ b/tbl_export.php
@@ -56,14 +56,14 @@ $export_page_title = __('View dump (schema) of table');
if (! empty($sql_query)) {
$parser = new PhpMyAdmin\SqlParser\Parser($sql_query);
- if ((! empty($parser->statements[0]))
+ if (! empty($parser->statements[0])
&& ($parser->statements[0] instanceof PhpMyAdmin\SqlParser\Statements\SelectStatement)
) {
// Finding aliases and removing them, but we keep track of them to be
// able to replace them in select expression too.
$aliases = [];
foreach ($parser->statements[0]->from as $from) {
- if ((! empty($from->table)) && (! empty($from->alias))) {
+ if (! empty($from->table) && ! empty($from->alias)) {
$aliases[$from->alias] = $from->table;
// We remove the alias of the table because they are going to
// be replaced anyway.
@@ -87,7 +87,7 @@ if (! empty($sql_query)) {
}
// Checking if the WHERE clause has to be replaced.
- if ((! empty($where_clause)) && (is_array($where_clause))) {
+ if (! empty($where_clause) && is_array($where_clause)) {
$replaces[] = [
'WHERE',
'WHERE (' . implode(') OR (', $where_clause) . ')',
diff --git a/tbl_operations.php b/tbl_operations.php
index 8bc2e4968d..08d0fc653b 100644
--- a/tbl_operations.php
+++ b/tbl_operations.php
@@ -93,7 +93,7 @@ if ($pma_table->isEngine('ARIA')) {
$create_options['transactional'] = (isset($create_options['transactional']) && $create_options['transactional'] == '0')
? '0'
: '1';
- $create_options['page_checksum'] = (isset($create_options['page_checksum'])) ? $create_options['page_checksum'] : '';
+ $create_options['page_checksum'] = isset($create_options['page_checksum']) ? $create_options['page_checksum'] : '';
}
$pma_table = $GLOBALS['dbi']->getTable(
@@ -166,13 +166,13 @@ if (isset($_POST['submitoptions'])) {
$create_options['transactional'] = (isset($create_options['transactional']) && $create_options['transactional'] == '0')
? '0'
: '1';
- $create_options['page_checksum'] = (isset($create_options['page_checksum'])) ? $create_options['page_checksum'] : '';
+ $create_options['page_checksum'] = isset($create_options['page_checksum']) ? $create_options['page_checksum'] : '';
}
} else {
$new_tbl_storage_engine = '';
}
- $row_format = (isset($create_options['row_format']))
+ $row_format = isset($create_options['row_format'])
? $create_options['row_format']
: $pma_table->getRowFormat();
@@ -180,7 +180,7 @@ if (isset($_POST['submitoptions'])) {
$pma_table,
$create_options['pack_keys'],
(empty($create_options['checksum']) ? '0' : '1'),
- ((isset($create_options['page_checksum'])) ? $create_options['page_checksum'] : ''),
+ (isset($create_options['page_checksum']) ? $create_options['page_checksum'] : ''),
(empty($create_options['delay_key_write']) ? '0' : '1'),
$row_format,
$new_tbl_storage_engine,
@@ -388,7 +388,7 @@ $response->addHTML(
$auto_increment,
(empty($create_options['delay_key_write']) ? '0' : '1'),
((isset($create_options['transactional']) && $create_options['transactional'] == '0') ? '0' : '1'),
- ((isset($create_options['page_checksum'])) ? $create_options['page_checksum'] : ''),
+ (isset($create_options['page_checksum']) ? $create_options['page_checksum'] : ''),
(empty($create_options['checksum']) ? '0' : '1')
)
);
diff --git a/version_check.php b/version_check.php
index 60bcdb3fe6..15074c3cd3 100644
--- a/version_check.php
+++ b/version_check.php
@@ -42,8 +42,8 @@ if (empty($versionDetails)) {
}
echo json_encode(
[
- 'version' => (! empty($version) ? $version : ''),
- 'date' => (! empty($date) ? $date : ''),
+ 'version' => ! empty($version) ? $version : '',
+ 'date' => ! empty($date) ? $date : '',
]
);
}
|