';
@@ -1806,7 +1813,10 @@ class Operations
$sql_query .= ';';
$result = $this->dbi->query($sql_query);
- return [$sql_query, $result];
+ return [
+ $sql_query,
+ $result,
+ ];
}
/**
@@ -1968,7 +1978,10 @@ class Operations
$result = $this->dbi->query($sql_query);
- return [$sql_query, $result];
+ return [
+ $sql_query,
+ $result,
+ ];
}
/**
diff --git a/libraries/classes/OutputBuffering.php b/libraries/classes/OutputBuffering.php
index 712e7e6208..cd44e6afca 100644
--- a/libraries/classes/OutputBuffering.php
+++ b/libraries/classes/OutputBuffering.php
@@ -90,7 +90,10 @@ class OutputBuffering
header('X-ob_mode: ' . $this->_mode);
}
register_shutdown_function(
- [OutputBuffering::class, 'stop']
+ [
+ OutputBuffering::class,
+ 'stop',
+ ]
);
$this->_on = true;
}
diff --git a/libraries/classes/ParseAnalyze.php b/libraries/classes/ParseAnalyze.php
index 9166854b5d..8fa8ff2e0b 100644
--- a/libraries/classes/ParseAnalyze.php
+++ b/libraries/classes/ParseAnalyze.php
@@ -75,6 +75,10 @@ class ParseAnalyze
$analyzed_sql_results['reload'] = $reload;
}
- return [$analyzed_sql_results, $db, $table];
+ return [
+ $analyzed_sql_results,
+ $db,
+ $table,
+ ];
}
}
diff --git a/libraries/classes/Plugins/Auth/AuthenticationCookie.php b/libraries/classes/Plugins/Auth/AuthenticationCookie.php
index 0a18257ba6..38c7c161fe 100644
--- a/libraries/classes/Plugins/Auth/AuthenticationCookie.php
+++ b/libraries/classes/Plugins/Auth/AuthenticationCookie.php
@@ -134,13 +134,13 @@ class AuthenticationCookie extends AuthenticationPlugin
echo $this->template->render('login/header', [
'theme' => $GLOBALS['PMA_Theme'],
'add_class' => ' modal_form',
- 'session_expired' => 1
+ 'session_expired' => 1,
]);
} else {
echo $this->template->render('login/header', [
'theme' => $GLOBALS['PMA_Theme'],
'add_class' => '',
- 'session_expired' => 0
+ 'session_expired' => 0,
]);
}
diff --git a/libraries/classes/Plugins/Export/ExportJson.php b/libraries/classes/Plugins/Export/ExportJson.php
index 27f80d7fdb..b7befa7a79 100644
--- a/libraries/classes/Plugins/Export/ExportJson.php
+++ b/libraries/classes/Plugins/Export/ExportJson.php
@@ -157,7 +157,7 @@ class ExportJson extends ExportPlugin
$meta = [
'type' => 'database',
- 'name' => $db_alias
+ 'name' => $db_alias,
];
return $this->export->outputHandler(
diff --git a/libraries/classes/Plugins/Export/ExportLatex.php b/libraries/classes/Plugins/Export/ExportLatex.php
index 9ac47af4d6..9d796209f1 100644
--- a/libraries/classes/Plugins/Export/ExportLatex.php
+++ b/libraries/classes/Plugins/Export/ExportLatex.php
@@ -346,13 +346,19 @@ class ExportLatex extends ExportPlugin
'texEscape',
get_class($this),
],
- ['table' => $table_alias, 'database' => $db_alias]
+ [
+ 'table' => $table_alias,
+ 'database' => $db_alias,
+ ]
)
. '} \\label{'
. Util::expandUserString(
$GLOBALS['latex_data_label'],
null,
- ['table' => $table_alias, 'database' => $db_alias]
+ [
+ 'table' => $table_alias,
+ 'database' => $db_alias,
+ ]
)
. '} \\\\';
}
@@ -381,7 +387,10 @@ class ExportLatex extends ExportPlugin
'texEscape',
get_class($this),
],
- ['table' => $table_alias, 'database' => $db_alias]
+ [
+ 'table' => $table_alias,
+ 'database' => $db_alias,
+ ]
)
. '} \\\\ '
)
@@ -553,13 +562,19 @@ class ExportLatex extends ExportPlugin
'texEscape',
get_class($this),
],
- ['table' => $table_alias, 'database' => $db_alias]
+ [
+ 'table' => $table_alias,
+ 'database' => $db_alias,
+ ]
)
. '} \\label{'
. Util::expandUserString(
$GLOBALS['latex_structure_label'],
null,
- ['table' => $table_alias, 'database' => $db_alias]
+ [
+ 'table' => $table_alias,
+ 'database' => $db_alias,
+ ]
)
. '} \\\\' . $crlf;
}
@@ -574,7 +589,10 @@ class ExportLatex extends ExportPlugin
'texEscape',
get_class($this),
],
- ['table' => $table_alias, 'database' => $db_alias]
+ [
+ 'table' => $table_alias,
+ 'database' => $db_alias,
+ ]
)
. '} \\\\ ' . $crlf;
}
@@ -672,7 +690,16 @@ class ExportLatex extends ExportPlugin
*/
public static function texEscape($string)
{
- $escape = ['$', '%', '{', '}', '&', '#', '_', '^'];
+ $escape = [
+ '$',
+ '%',
+ '{',
+ '}',
+ '&',
+ '#',
+ '_',
+ '^',
+ ];
$cnt_escape = count($escape);
for ($k = 0; $k < $cnt_escape; $k++) {
$string = str_replace($escape[$k], '\\' . $escape[$k], $string);
diff --git a/libraries/classes/Plugins/Export/ExportPdf.php b/libraries/classes/Plugins/Export/ExportPdf.php
index d4accbb944..a36277368b 100644
--- a/libraries/classes/Plugins/Export/ExportPdf.php
+++ b/libraries/classes/Plugins/Export/ExportPdf.php
@@ -140,7 +140,10 @@ class ExportPdf extends ExportPlugin
$pdf = $this->_getPdf();
$pdf->Open();
- $attr = ['titleFontSize' => 18, 'titleText' => $pdf_report_title];
+ $attr = [
+ 'titleFontSize' => 18,
+ 'titleText' => $pdf_report_title
+ ];
$pdf->setAttributes($attr);
$pdf->setTopMargin(30);
@@ -229,7 +232,7 @@ class ExportPdf extends ExportPlugin
'dbAlias' => $db_alias,
'tableAlias' => $table_alias,
'aliases' => $aliases,
- 'purpose' => __('Dumping data')
+ 'purpose' => __('Dumping data'),
];
$pdf->setAttributes($attr);
$pdf->mysqlReport($sql_query);
diff --git a/libraries/classes/Plugins/Export/ExportSql.php b/libraries/classes/Plugins/Export/ExportSql.php
index 572825f0fa..0acf48f881 100644
--- a/libraries/classes/Plugins/Export/ExportSql.php
+++ b/libraries/classes/Plugins/Export/ExportSql.php
@@ -384,7 +384,7 @@ class ExportSql extends ExportPlugin
$leaf->setDoc(
[
'manual_MySQL_Database_Administration',
- 'insert_delayed'
+ 'insert_delayed',
]
);
$subgroup->addProperty($leaf);
@@ -2769,8 +2769,7 @@ class ExportSql extends ExportPlugin
// Column name.
if (! empty($field->type)) {
if (! empty($aliases[$old_database]['tables'][$old_table]['columns'][$field->name])) {
- $field->name = $aliases[$old_database]['tables']
- [$old_table]['columns'][$field->name];
+ $field->name = $aliases[$old_database]['tables'][$old_table]['columns'][$field->name];
$flag = true;
}
}
@@ -2779,8 +2778,7 @@ class ExportSql extends ExportPlugin
if (! empty($field->key)) {
foreach ($field->key->columns as $key => $column) {
if (! empty($aliases[$old_database]['tables'][$old_table]['columns'][$column['name']])) {
- $field->key->columns[$key]['name'] = $aliases[$old_database]
- ['tables'][$old_table]['columns'][$column['name']];
+ $field->key->columns[$key]['name'] = $aliases[$old_database]['tables'][$old_table]['columns'][$column['name']];
$flag = true;
}
}
diff --git a/libraries/classes/Plugins/Export/ExportYaml.php b/libraries/classes/Plugins/Export/ExportYaml.php
index 1935c563a7..9b9da93eb9 100644
--- a/libraries/classes/Plugins/Export/ExportYaml.php
+++ b/libraries/classes/Plugins/Export/ExportYaml.php
@@ -202,8 +202,18 @@ class ExportYaml extends ExportPlugin
}
$record[$i] = str_replace(
- ['\\', '"', "\n", "\r"],
- ['\\\\', '\"', '\n', '\r'],
+ [
+ '\\',
+ '"',
+ "\n",
+ "\r",
+ ],
+ [
+ '\\\\',
+ '\"',
+ '\n',
+ '\r',
+ ],
$record[$i]
);
$buffer .= ' ' . $columns[$i] . ': "' . $record[$i] . '"' . $crlf;
diff --git a/libraries/classes/Plugins/Export/Helpers/Pdf.php b/libraries/classes/Plugins/Export/Helpers/Pdf.php
index 30a626871b..0601d2271c 100644
--- a/libraries/classes/Plugins/Export/Helpers/Pdf.php
+++ b/libraries/classes/Plugins/Export/Helpers/Pdf.php
@@ -631,29 +631,29 @@ class Pdf extends PdfLib
$column['Default'] = 'NULL';
}
}
- $data [] = $column['Field'];
- $data [] = $type;
- $data [] = $column['Null'] == '' || $column['Null'] == 'NO'
+ $data[] = $column['Field'];
+ $data[] = $type;
+ $data[] = $column['Null'] == '' || $column['Null'] == 'NO'
? 'No'
: 'Yes';
- $data [] = isset($column['Default']) ? $column['Default'] : '';
+ $data[] = isset($column['Default']) ? $column['Default'] : '';
$field_name = $column['Field'];
if ($do_relation && $have_rel) {
- $data [] = isset($res_rel[$field_name])
+ $data[] = isset($res_rel[$field_name])
? $res_rel[$field_name]['foreign_table']
. ' (' . $res_rel[$field_name]['foreign_field']
. ')'
: '';
}
if ($do_comments) {
- $data [] = isset($comments[$field_name])
+ $data[] = isset($comments[$field_name])
? $comments[$field_name]
: '';
}
if ($do_mime) {
- $data [] = isset($mime_map[$field_name])
+ $data[] = isset($mime_map[$field_name])
? $mime_map[$field_name]['mimetype']
: '';
}
diff --git a/libraries/classes/Plugins/Import/ImportCsv.php b/libraries/classes/Plugins/Import/ImportCsv.php
index 83927f3348..3a21aeebac 100644
--- a/libraries/classes/Plugins/Import/ImportCsv.php
+++ b/libraries/classes/Plugins/Import/ImportCsv.php
@@ -684,7 +684,11 @@ class ImportCsv extends AbstractImportCsv
$tbl_name = 'TBL_NAME';
}
- $tables[] = [$tbl_name, $col_names, $rows];
+ $tables[] = [
+ $tbl_name,
+ $col_names,
+ $rows,
+ ];
/* Obtain the best-fit MySQL types for each column */
$analyses = [];
diff --git a/libraries/classes/Plugins/Import/ImportMediawiki.php b/libraries/classes/Plugins/Import/ImportMediawiki.php
index 698d44f010..10b28be5c1 100644
--- a/libraries/classes/Plugins/Import/ImportMediawiki.php
+++ b/libraries/classes/Plugins/Import/ImportMediawiki.php
@@ -219,7 +219,7 @@ class ImportMediawiki extends ImportPlugin
$cur_temp_table_headers = $cur_temp_line;
} else {
// Normal line, add it to the table
- $cur_temp_table [] = $cur_temp_line;
+ $cur_temp_table[] = $cur_temp_line;
}
}
@@ -261,13 +261,16 @@ class ImportMediawiki extends ImportPlugin
// Delete the beginning of the column, if there is one
$cell = trim($cell);
- $col_start_chars = ["|", "!"];
+ $col_start_chars = [
+ "|",
+ "!",
+ ];
foreach ($col_start_chars as $col_start_char) {
$cell = $this->_getCellContent($cell, $col_start_char);
}
// Add the cell to the row
- $cur_temp_line [] = $cell;
+ $cur_temp_line[] = $cell;
} // foreach $cells
} else {
// If it's none of the above, then the current line has a bad
@@ -310,11 +313,15 @@ class ImportMediawiki extends ImportPlugin
// Create the tables array to be used in Import::buildSql()
$tables = [];
- $tables [] = [$table[0], $table[1], $table[2]];
+ $tables[] = [
+ $table[0],
+ $table[1],
+ $table[2],
+ ];
// Obtain the best-fit MySQL types for each column
$analyses = [];
- $analyses [] = $this->import->analyzeTable($tables[0]);
+ $analyses[] = $this->import->analyzeTable($tables[0]);
$this->_executeImportTables($tables, $analyses, $sql_data);
}
@@ -355,7 +362,7 @@ class ImportMediawiki extends ImportPlugin
// If they are not set, generic names will be given (COL 1, COL 2, etc)
$num_cols = count($table_row);
for ($i = 0; $i < $num_cols; ++$i) {
- $table_headers [$i] = 'COL ' . ($i + 1);
+ $table_headers[$i] = 'COL ' . ($i + 1);
}
}
}
diff --git a/libraries/classes/Plugins/Import/ImportOds.php b/libraries/classes/Plugins/Import/ImportOds.php
index 8d72d2d972..39734ba398 100644
--- a/libraries/classes/Plugins/Import/ImportOds.php
+++ b/libraries/classes/Plugins/Import/ImportOds.php
@@ -312,7 +312,11 @@ class ImportOds extends ImportPlugin
$tables[] = [(string) $tbl_attr['name']];
/* Store the current sheet in the accumulator */
- $rows[] = [(string) $tbl_attr['name'], $col_names, $tempRows];
+ $rows[] = [
+ (string) $tbl_attr['name'],
+ $col_names,
+ $tempRows,
+ ];
$tempRows = [];
$col_names = [];
$max_cols = 0;
diff --git a/libraries/classes/Plugins/Import/ImportShp.php b/libraries/classes/Plugins/Import/ImportShp.php
index 4c0ec76d4b..ae0d2c7fff 100644
--- a/libraries/classes/Plugins/Import/ImportShp.php
+++ b/libraries/classes/Plugins/Import/ImportShp.php
@@ -260,7 +260,13 @@ class ImportShp extends ImportPlugin
} else {
$table_name = 'TBL_NAME';
}
- $tables = [[$table_name, $col_names, $rows]];
+ $tables = [
+ [
+ $table_name,
+ $col_names,
+ $rows,
+ ],
+ ];
// Use data from shape file to chose best-fit MySQL types for each column
$analyses = [];
diff --git a/libraries/classes/Plugins/Import/ImportXml.php b/libraries/classes/Plugins/Import/ImportXml.php
index fce5b7eced..f2860efd6d 100644
--- a/libraries/classes/Plugins/Import/ImportXml.php
+++ b/libraries/classes/Plugins/Import/ImportXml.php
@@ -268,7 +268,11 @@ class ImportXml extends ImportPlugin
$tempCells[] = (string) $v2;
}
- $rows[] = [(string) $tbl_attr['name'], $tempRow, $tempCells];
+ $rows[] = [
+ (string) $tbl_attr['name'],
+ $tempRow,
+ $tempCells,
+ ];
$tempRow = [];
$tempCells = [];
diff --git a/libraries/classes/Plugins/ImportPlugin.php b/libraries/classes/Plugins/ImportPlugin.php
index 7fd015816f..a5df087a05 100644
--- a/libraries/classes/Plugins/ImportPlugin.php
+++ b/libraries/classes/Plugins/ImportPlugin.php
@@ -86,6 +86,9 @@ abstract class ImportPlugin
$options = null;
}
- return [$db_name, $options];
+ return [
+ $db_name,
+ $options,
+ ];
}
}
diff --git a/libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php b/libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php
index c00fd34e41..bd445326b8 100644
--- a/libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php
+++ b/libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php
@@ -88,9 +88,17 @@ class RelationStatsDia
// left, right, position
$value = 12;
if ($pos != 0) {
- return [$pos + $value + $pos, $pos + $value + $pos + 1, $pos];
+ return [
+ $pos + $value + $pos,
+ $pos + $value + $pos + 1,
+ $pos,
+ ];
}
- return [$pos + $value , $pos + $value + 1, $pos];
+ return [
+ $pos + $value,
+ $pos + $value + 1,
+ $pos,
+ ];
}
/**
diff --git a/libraries/classes/Plugins/Schema/Dia/TableStatsDia.php b/libraries/classes/Plugins/Schema/Dia/TableStatsDia.php
index 816483f325..b3ae5a0030 100644
--- a/libraries/classes/Plugins/Schema/Dia/TableStatsDia.php
+++ b/libraries/classes/Plugins/Schema/Dia/TableStatsDia.php
@@ -102,7 +102,7 @@ class TableStatsDia extends TableStats
$listOfColors = [
'FF0000',
'000099',
- '00FF00'
+ '00FF00',
];
shuffle($listOfColors);
$this->tableColor = '#' . $listOfColors[0] . '';
diff --git a/libraries/classes/Plugins/Schema/Pdf/PdfRelationSchema.php b/libraries/classes/Plugins/Schema/Pdf/PdfRelationSchema.php
index 0e70d6e82c..1c05b849f5 100644
--- a/libraries/classes/Plugins/Schema/Pdf/PdfRelationSchema.php
+++ b/libraries/classes/Plugins/Schema/Pdf/PdfRelationSchema.php
@@ -702,7 +702,17 @@ class PdfRelationSchema extends ExportRelationSchema
$this->diagram->Cell($comments_width, 8, __('Comments'), 1, 0, 'C');
$this->diagram->Cell(45, 8, 'MIME', 1, 1, 'C');
$this->diagram->setWidths(
- [25, 20, 20, 10, 20, 25, 45, $comments_width, 45]
+ [
+ 25,
+ 20,
+ 20,
+ 10,
+ 20,
+ 25,
+ 45,
+ $comments_width,
+ 45,
+ ]
);
} else {
$this->diagram->Cell(20, 8, __('Column'), 1, 0, 'C');
@@ -769,15 +779,14 @@ class PdfRelationSchema extends ExportRelationSchema
: ''),
(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];
if ($foreigner
&& isset($this->diagram->PMA_links['doc'][$foreigner['foreign_table']][$foreigner['foreign_field']])
) {
- $links[6] = $this->diagram->PMA_links['doc']
- [$foreigner['foreign_table']][$foreigner['foreign_field']];
+ $links[6] = $this->diagram->PMA_links['doc'][$foreigner['foreign_table']][$foreigner['foreign_field']];
} else {
unset($links[6]);
}
diff --git a/libraries/classes/Plugins/Schema/Pdf/RelationStatsPdf.php b/libraries/classes/Plugins/Schema/Pdf/RelationStatsPdf.php
index 4495e847d3..aaf1d15d6a 100644
--- a/libraries/classes/Plugins/Schema/Pdf/RelationStatsPdf.php
+++ b/libraries/classes/Plugins/Schema/Pdf/RelationStatsPdf.php
@@ -72,12 +72,36 @@ class RelationStatsPdf extends RelationStats
$j = $j % 4;
$j++;
$case = [
- [1, 0, 0],
- [0, 1, 0],
- [0, 0, 1],
- [1, 1, 0],
- [1, 0, 1],
- [0, 1, 1]
+ [
+ 1,
+ 0,
+ 0,
+ ],
+ [
+ 0,
+ 1,
+ 0,
+ ],
+ [
+ 0,
+ 0,
+ 1,
+ ],
+ [
+ 1,
+ 1,
+ 0,
+ ],
+ [
+ 1,
+ 0,
+ 1,
+ ],
+ [
+ 0,
+ 1,
+ 1,
+ ],
];
list ($a, $b, $c) = $case[$d];
$e = (1 - ($j - 1) / 6);
diff --git a/libraries/classes/Plugins/Transformations/Abs/ExternalTransformationsPlugin.php b/libraries/classes/Plugins/Transformations/Abs/ExternalTransformationsPlugin.php
index 96fb09b664..eeef780b88 100644
--- a/libraries/classes/Plugins/Transformations/Abs/ExternalTransformationsPlugin.php
+++ b/libraries/classes/Plugins/Transformations/Abs/ExternalTransformationsPlugin.php
@@ -114,8 +114,14 @@ abstract class ExternalTransformationsPlugin extends TransformationsPlugin
// needs PHP >= 4.3.0
$newstring = '';
$descriptorspec = [
- 0 => ["pipe", "r"],
- 1 => ["pipe", "w"],
+ 0 => [
+ "pipe",
+ "r",
+ ],
+ 1 => [
+ "pipe",
+ "w",
+ ],
];
$process = proc_open($program . ' ' . $options[1], $descriptorspec, $pipes);
if (is_resource($process)) {
diff --git a/libraries/classes/Properties/Options/OptionsPropertyGroup.php b/libraries/classes/Properties/Options/OptionsPropertyGroup.php
index 9bf59487c4..e91ad32af6 100644
--- a/libraries/classes/Properties/Options/OptionsPropertyGroup.php
+++ b/libraries/classes/Properties/Options/OptionsPropertyGroup.php
@@ -40,7 +40,7 @@ abstract class OptionsPropertyGroup extends OptionsPropertyItem implements \Coun
) {
return;
}
- $this->_properties [] = $property;
+ $this->_properties[] = $property;
}
/**
diff --git a/libraries/classes/RecentFavoriteTable.php b/libraries/classes/RecentFavoriteTable.php
index ca747e6e17..6b1d5fce48 100644
--- a/libraries/classes/RecentFavoriteTable.php
+++ b/libraries/classes/RecentFavoriteTable.php
@@ -190,7 +190,7 @@ class RecentFavoriteTable
$html .= '
';
$recent_params = [
'db' => $table['db'],
- 'table' => $table['table']
+ 'table' => $table['table'],
];
$recent_url = 'tbl_recent_favorite.php'
. Url::getCommon($recent_params);
@@ -208,7 +208,7 @@ class RecentFavoriteTable
'db' => $table['db'],
'ajax_request' => true,
'favorite_table' => $table['table'],
- 'remove_favorite' => true
+ 'remove_favorite' => true,
];
$fav_rm_url = 'db_structure.php'
. Url::getCommon($fav_params);
@@ -222,7 +222,7 @@ class RecentFavoriteTable
$fav_params = [
'db' => $table['db'],
- 'table' => $table['table']
+ 'table' => $table['table'],
];
$table_url = 'tbl_recent_favorite.php'
. Url::getCommon($fav_params);
@@ -359,7 +359,7 @@ class RecentFavoriteTable
$params = [
'ajax_request' => true,
'favorite_table' => true,
- 'sync_favorite_tables' => true
+ 'sync_favorite_tables' => true,
];
$url = 'db_structure.php' . Url::getCommon($params);
$retval = ' true, 'recent_table' => true];
+ $params = [
+ 'ajax_request' => true,
+ 'recent_table' => true,
+ ];
$url = 'index.php' . Url::getCommon($params);
$retval = '';
diff --git a/libraries/classes/Relation.php b/libraries/classes/Relation.php
index c690de3227..60bfe8a967 100644
--- a/libraries/classes/Relation.php
+++ b/libraries/classes/Relation.php
@@ -487,9 +487,15 @@ class Relation
$workToTable = [
'relwork' => 'relation',
- 'displaywork' => ['relation', 'table_info'],
+ 'displaywork' => [
+ 'relation',
+ 'table_info',
+ ],
'bookmarkwork' => 'bookmarktable',
- 'pdfwork' => ['table_coords', 'pdf_pages'],
+ 'pdfwork' => [
+ 'table_coords',
+ 'pdf_pages',
+ ],
'commwork' => 'column_info',
'mimework' => 'column_info',
'historywork' => 'history',
@@ -498,7 +504,10 @@ class Relation
'uiprefswork' => 'table_uiprefs',
'trackingwork' => 'tracking',
'userconfigwork' => 'userconfig',
- 'menuswork' => ['users', 'usergroups'],
+ 'menuswork' => [
+ 'users',
+ 'usergroups',
+ ],
'navwork' => 'navigationhiding',
'savedsearcheswork' => 'savedsearches',
'centralcolumnswork' => 'central_columns',
@@ -711,7 +720,7 @@ class Relation
// Check whether column_info table has input transformation columns
$new_cols = [
"input_transformation",
- "input_transformation_options"
+ "input_transformation_options",
];
$query = 'SHOW COLUMNS FROM '
. Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
@@ -1834,7 +1843,10 @@ class Relation
$child_references = $this->dbi->fetchResult(
$rel_query,
- ['referenced_column_name', null]
+ [
+ 'referenced_column_name',
+ null,
+ ]
);
}
return $child_references;
@@ -2155,7 +2167,10 @@ class Relation
$have_rel = false;
$res_rel = [];
} // end if
- return [$res_rel, $have_rel];
+ return [
+ $res_rel,
+ $have_rel,
+ ];
}
/**
diff --git a/libraries/classes/ReplicationGui.php b/libraries/classes/ReplicationGui.php
index fa614b24ae..eb284c5a65 100644
--- a/libraries/classes/ReplicationGui.php
+++ b/libraries/classes/ReplicationGui.php
@@ -432,7 +432,10 @@ class ReplicationGui
$html .= 'server-id=' . time() . '
';
$html .= $this->getHtmlForAddUserInputDiv(
- ['text' => __('User name:'), 'for' => "text_username"],
+ [
+ 'text' => __('User name:'),
+ 'for' => "text_username"
+ ],
[
'type' => 'text',
'name' => 'username',
@@ -444,18 +447,24 @@ class ReplicationGui
);
$html .= $this->getHtmlForAddUserInputDiv(
- ['text' => __('Password:'), 'for' => "text_pma_pw"],
+ [
+ 'text' => __('Password:'),
+ 'for' => "text_pma_pw"
+ ],
[
'type' => 'password',
'name' => 'pma_pw',
'id' => 'text_pma_pw',
'title' => __('Password'),
- 'required' => 'required'
+ 'required' => 'required',
]
);
$html .= $this->getHtmlForAddUserInputDiv(
- ['text' => __('Host:'), 'for' => "text_hostname"],
+ [
+ 'text' => __('Host:'),
+ 'for' => "text_hostname"
+ ],
[
'type' => 'text',
'name' => 'hostname',
@@ -467,7 +476,10 @@ class ReplicationGui
);
$html .= $this->getHtmlForAddUserInputDiv(
- ['text' => __('Port:'), 'for' => "text_port"],
+ [
+ 'text' => __('Port:'),
+ 'for' => "text_port"
+ ],
[
'type' => 'number',
'name' => 'text_port',
@@ -590,9 +602,12 @@ class ReplicationGui
}
// allow wrapping long table lists into multiple lines
$variables_wrap = [
- 'Replicate_Do_DB', 'Replicate_Ignore_DB',
- 'Replicate_Do_Table', 'Replicate_Ignore_Table',
- 'Replicate_Wild_Do_Table', 'Replicate_Wild_Ignore_Table'
+ 'Replicate_Do_DB',
+ 'Replicate_Ignore_DB',
+ 'Replicate_Do_Table',
+ 'Replicate_Ignore_Table',
+ 'Replicate_Wild_Do_Table',
+ 'Replicate_Wild_Ignore_Table',
];
if (in_array($variable, $variables_wrap)) {
$html .= htmlspecialchars(str_replace(
@@ -690,7 +705,10 @@ class ReplicationGui
}
}
}
- return [$username_length, $hostname_length];
+ return [
+ $username_length,
+ $hostname_length,
+ ];
}
/**
diff --git a/libraries/classes/Response.php b/libraries/classes/Response.php
index d21088bf0e..de039357ad 100644
--- a/libraries/classes/Response.php
+++ b/libraries/classes/Response.php
@@ -436,7 +436,7 @@ class Response
[
'db' => Core::ifSetOr($GLOBALS['db'], ''),
'table' => Core::ifSetOr($GLOBALS['table'], ''),
- 'sql_query' => $query
+ 'sql_query' => $query,
]
);
if (! empty($GLOBALS['focus_querywindow'])) {
diff --git a/libraries/classes/Rte/Events.php b/libraries/classes/Rte/Events.php
index e0915c0f63..15dabc7e91 100644
--- a/libraries/classes/Rte/Events.php
+++ b/libraries/classes/Rte/Events.php
@@ -329,7 +329,7 @@ class Events
'item_definition',
'item_preserve',
'item_comment',
- 'item_definer'
+ 'item_definer',
];
foreach ($indices as $index) {
$retval[$index] = isset($_POST[$index]) ? $_POST[$index] : '';
@@ -423,7 +423,7 @@ class Events
'item_ends',
'item_definition',
'item_definer',
- 'item_comment'
+ 'item_comment',
];
foreach ($need_escape as $index) {
$item[$index] = htmlentities((string) $item[$index], ENT_QUOTES);
diff --git a/libraries/classes/Rte/Footer.php b/libraries/classes/Rte/Footer.php
index a948c032be..fd11484677 100644
--- a/libraries/classes/Rte/Footer.php
+++ b/libraries/classes/Rte/Footer.php
@@ -125,13 +125,13 @@ 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
$retval = "\n";
diff --git a/libraries/classes/Rte/Routines.php b/libraries/classes/Rte/Routines.php
index a36227468b..16acf5f91e 100644
--- a/libraries/classes/Rte/Routines.php
+++ b/libraries/classes/Rte/Routines.php
@@ -127,7 +127,7 @@ class Routines
/**
* Display a list of available routines
*/
- if (! Core::isValid($type, ['FUNCTION','PROCEDURE'])) {
+ if (! Core::isValid($type, ['FUNCTION', 'PROCEDURE'])) {
$type = null;
}
$items = $this->dbi->getRoutines($db, $type);
@@ -267,7 +267,10 @@ class Routines
if (! empty($_POST['editor_process_edit'])) {
$isProcOrFunc = in_array(
$_POST['item_original_type'],
- ['PROCEDURE', 'FUNCTION']
+ [
+ 'PROCEDURE',
+ 'FUNCTION',
+ ]
);
if (! $isProcOrFunc) {
@@ -451,7 +454,10 @@ class Routines
$errors
);
- return [$errors, null];
+ return [
+ $errors,
+ null,
+ ];
}
// Default value
@@ -481,7 +487,10 @@ class Routines
$message = $this->flushPrivileges($resultAdjust);
- return [[], $message];
+ return [
+ [],
+ $message,
+ ];
}
/**
@@ -536,7 +545,7 @@ class Routines
'item_returnopts_text',
'item_definition',
'item_comment',
- 'item_definer'
+ 'item_definer',
];
foreach ($indices as $index) {
$retval[$index] = isset($_POST[$index]) ? $_POST[$index] : '';
@@ -767,7 +776,7 @@ class Routines
'item_param_type' => [0 => ''],
'item_param_length' => [0 => ''],
'item_param_opts_num' => [0 => ''],
- 'item_param_opts_text' => [0 => '']
+ 'item_param_opts_text' => [0 => ''],
];
} elseif (! empty($routine)) {
// regular row for routine editor
@@ -879,7 +888,7 @@ class Routines
'item_returnlength',
'item_definition',
'item_definer',
- 'item_comment'
+ 'item_comment',
];
foreach ($need_escape as $key => $index) {
$routine[$index] = htmlentities($routine[$index], ENT_QUOTES, 'UTF-8');
@@ -1709,7 +1718,7 @@ class Routines
'Key' => '',
'Field' => '',
'Default' => '',
- 'first_timestamp' => false
+ 'first_timestamp' => false,
];
$retval .= " ';
@@ -497,7 +510,11 @@ class Monitor
} /* foreach */
} /* foreach */
}
- return [$serverVars, $statusVars, $ret];
+ return [
+ $serverVars,
+ $statusVars,
+ $ret,
+ ];
}
/**
@@ -576,7 +593,11 @@ class Monitor
break;
}
- return [$serverVars, $statusVars, $ret];
+ return [
+ $serverVars,
+ $statusVars,
+ $ret,
+ ];
}
/**
@@ -601,7 +622,10 @@ class Monitor
$result = $GLOBALS['dbi']->tryQuery($query);
- $return = ['rows' => [], 'sum' => []];
+ $return = [
+ 'rows' => [],
+ 'sum' => []
+ ];
while ($row = $GLOBALS['dbi']->fetchAssoc($result)) {
$type = mb_strtolower(
@@ -673,7 +697,10 @@ class Monitor
$result = $GLOBALS['dbi']->tryQuery($query);
- $return = ['rows' => [], 'sum' => []];
+ $return = [
+ 'rows' => [],
+ 'sum' => []
+ ];
$insertTables = [];
$insertTablesFirst = -1;
$i = 0;
diff --git a/libraries/classes/Server/Status/Processes.php b/libraries/classes/Server/Status/Processes.php
index 4daada1242..bfd1e103e6 100644
--- a/libraries/classes/Server/Status/Processes.php
+++ b/libraries/classes/Server/Status/Processes.php
@@ -41,7 +41,20 @@ class Processes
$retval .= Data::getHtmlForRefreshList(
'refreshRate',
5,
- [2, 3, 4, 5, 10, 20, 40, 60, 120, 300, 600, 1200]
+ [
+ 2,
+ 3,
+ 4,
+ 5,
+ 10,
+ 20,
+ 40,
+ 60,
+ 120,
+ 300,
+ 600,
+ 1200,
+ ]
);
$retval .= '';
$retval .= '