diff --git a/examples/openid.php b/examples/openid.php
index 641d441078..ab16f8eb14 100644
--- a/examples/openid.php
+++ b/examples/openid.php
@@ -31,8 +31,8 @@ $AUTH_MAP = [
'https://launchpad.net/~username' => [
'user' => 'root',
'password' => '',
- ],
- ];
+ ],
+];
/**
* Simple function to show HTML page with given content.
diff --git a/export.php b/export.php
index 0ace7dfdc4..29e5ee115f 100644
--- a/export.php
+++ b/export.php
@@ -56,123 +56,123 @@ if (isset($_GET['check_time_out'])) {
* without checking
*/
$post_params = [
- 'db',
- 'table',
- 'what',
- 'single_table',
- 'export_type',
- 'export_method',
- 'quick_or_custom',
- 'db_select',
- 'table_select',
- 'table_structure',
- 'table_data',
- 'limit_to',
- 'limit_from',
- 'allrows',
- 'lock_tables',
- 'output_format',
- 'filename_template',
- 'maxsize',
- 'remember_template',
- 'charset',
- 'compression',
- 'as_separate_files',
- 'knjenc',
- 'xkana',
- 'htmlword_structure_or_data',
- 'htmlword_null',
- 'htmlword_columns',
- 'mediawiki_headers',
- 'mediawiki_structure_or_data',
- 'mediawiki_caption',
- 'pdf_structure_or_data',
- 'odt_structure_or_data',
- 'odt_relation',
- 'odt_comments',
- 'odt_mime',
- 'odt_columns',
- 'odt_null',
- 'codegen_structure_or_data',
- 'codegen_format',
- 'excel_null',
- 'excel_removeCRLF',
- 'excel_columns',
- 'excel_edition',
- 'excel_structure_or_data',
- 'yaml_structure_or_data',
- 'ods_null',
- 'ods_structure_or_data',
- 'ods_columns',
- 'json_structure_or_data',
- 'json_pretty_print',
- 'json_unicode',
- 'xml_structure_or_data',
- 'xml_export_events',
- 'xml_export_functions',
- 'xml_export_procedures',
- 'xml_export_tables',
- 'xml_export_triggers',
- 'xml_export_views',
- 'xml_export_contents',
- 'texytext_structure_or_data',
- 'texytext_columns',
- 'texytext_null',
- 'phparray_structure_or_data',
- 'sql_include_comments',
- 'sql_header_comment',
- 'sql_dates',
- 'sql_relation',
- 'sql_mime',
- 'sql_use_transaction',
- 'sql_disable_fk',
- 'sql_compatibility',
- 'sql_structure_or_data',
- 'sql_create_database',
- 'sql_drop_table',
- 'sql_procedure_function',
- 'sql_create_table',
- 'sql_create_view',
- 'sql_create_trigger',
- 'sql_view_current_user',
- 'sql_if_not_exists',
- 'sql_or_replace_view',
- 'sql_auto_increment',
- 'sql_backquotes',
- 'sql_truncate',
- 'sql_delayed',
- 'sql_ignore',
- 'sql_type',
- 'sql_insert_syntax',
- 'sql_max_query_size',
- 'sql_hex_for_binary',
- 'sql_utc_time',
- 'sql_drop_database',
- 'sql_views_as_tables',
- 'sql_metadata',
- 'csv_separator',
- 'csv_enclosed',
- 'csv_escaped',
- 'csv_terminated',
- 'csv_null',
- 'csv_removeCRLF',
- 'csv_columns',
- 'csv_structure_or_data',
- // csv_replace should have been here but we use it directly from $_POST
- 'latex_caption',
- 'latex_structure_or_data',
- 'latex_structure_caption',
- 'latex_structure_continued_caption',
- 'latex_structure_label',
- 'latex_relation',
- 'latex_comments',
- 'latex_mime',
- 'latex_columns',
- 'latex_data_caption',
- 'latex_data_continued_caption',
- 'latex_data_label',
- 'latex_null',
- 'aliases'
+ 'db',
+ 'table',
+ 'what',
+ 'single_table',
+ 'export_type',
+ 'export_method',
+ 'quick_or_custom',
+ 'db_select',
+ 'table_select',
+ 'table_structure',
+ 'table_data',
+ 'limit_to',
+ 'limit_from',
+ 'allrows',
+ 'lock_tables',
+ 'output_format',
+ 'filename_template',
+ 'maxsize',
+ 'remember_template',
+ 'charset',
+ 'compression',
+ 'as_separate_files',
+ 'knjenc',
+ 'xkana',
+ 'htmlword_structure_or_data',
+ 'htmlword_null',
+ 'htmlword_columns',
+ 'mediawiki_headers',
+ 'mediawiki_structure_or_data',
+ 'mediawiki_caption',
+ 'pdf_structure_or_data',
+ 'odt_structure_or_data',
+ 'odt_relation',
+ 'odt_comments',
+ 'odt_mime',
+ 'odt_columns',
+ 'odt_null',
+ 'codegen_structure_or_data',
+ 'codegen_format',
+ 'excel_null',
+ 'excel_removeCRLF',
+ 'excel_columns',
+ 'excel_edition',
+ 'excel_structure_or_data',
+ 'yaml_structure_or_data',
+ 'ods_null',
+ 'ods_structure_or_data',
+ 'ods_columns',
+ 'json_structure_or_data',
+ 'json_pretty_print',
+ 'json_unicode',
+ 'xml_structure_or_data',
+ 'xml_export_events',
+ 'xml_export_functions',
+ 'xml_export_procedures',
+ 'xml_export_tables',
+ 'xml_export_triggers',
+ 'xml_export_views',
+ 'xml_export_contents',
+ 'texytext_structure_or_data',
+ 'texytext_columns',
+ 'texytext_null',
+ 'phparray_structure_or_data',
+ 'sql_include_comments',
+ 'sql_header_comment',
+ 'sql_dates',
+ 'sql_relation',
+ 'sql_mime',
+ 'sql_use_transaction',
+ 'sql_disable_fk',
+ 'sql_compatibility',
+ 'sql_structure_or_data',
+ 'sql_create_database',
+ 'sql_drop_table',
+ 'sql_procedure_function',
+ 'sql_create_table',
+ 'sql_create_view',
+ 'sql_create_trigger',
+ 'sql_view_current_user',
+ 'sql_if_not_exists',
+ 'sql_or_replace_view',
+ 'sql_auto_increment',
+ 'sql_backquotes',
+ 'sql_truncate',
+ 'sql_delayed',
+ 'sql_ignore',
+ 'sql_type',
+ 'sql_insert_syntax',
+ 'sql_max_query_size',
+ 'sql_hex_for_binary',
+ 'sql_utc_time',
+ 'sql_drop_database',
+ 'sql_views_as_tables',
+ 'sql_metadata',
+ 'csv_separator',
+ 'csv_enclosed',
+ 'csv_escaped',
+ 'csv_terminated',
+ 'csv_null',
+ 'csv_removeCRLF',
+ 'csv_columns',
+ 'csv_structure_or_data',
+ // csv_replace should have been here but we use it directly from $_POST
+ 'latex_caption',
+ 'latex_structure_or_data',
+ 'latex_structure_caption',
+ 'latex_structure_continued_caption',
+ 'latex_structure_label',
+ 'latex_relation',
+ 'latex_comments',
+ 'latex_mime',
+ 'latex_columns',
+ 'latex_data_caption',
+ 'latex_data_continued_caption',
+ 'latex_data_label',
+ 'latex_null',
+ 'aliases'
];
foreach ($post_params as $one_post_param) {
diff --git a/libraries/classes/Config.php b/libraries/classes/Config.php
index ba4a2cb1cd..9ca3c33a78 100644
--- a/libraries/classes/Config.php
+++ b/libraries/classes/Config.php
@@ -724,7 +724,8 @@ class Config
$user2 = [
'name' => trim($user[1]),
'email' => trim($user[2]),
- 'date' => date('Y-m-d H:i:s', (int) $user[3])];
+ 'date' => date('Y-m-d H:i:s', (int) $user[3])
+ ];
if (isset($user[4])) {
$user2['date'] .= $user[4];
}
@@ -736,11 +737,13 @@ class Config
$author = [
'name' => $commit_json->author->name,
'email' => $commit_json->author->email,
- 'date' => $commit_json->author->date];
+ 'date' => $commit_json->author->date
+ ];
$committer = [
'name' => $commit_json->committer->name,
'email' => $commit_json->committer->email,
- 'date' => $commit_json->committer->date];
+ 'date' => $commit_json->committer->date
+ ];
$message = trim($commit_json->message);
} else {
$this->set('PMA_VERSION_GIT', 0);
@@ -1412,7 +1415,7 @@ class Config
'PMA_USR_OS',
'PMA_USR_BROWSER_VER',
'PMA_USR_BROWSER_AGENT'
- ];
+ ];
foreach ($defines as $define) {
if (! defined($define)) {
diff --git a/libraries/classes/Config/FormDisplay.php b/libraries/classes/Config/FormDisplay.php
index 8ec444ca84..a14b0d6989 100644
--- a/libraries/classes/Config/FormDisplay.php
+++ b/libraries/classes/Config/FormDisplay.php
@@ -103,7 +103,8 @@ class FormDisplay
'error_nan_nneg' => __('Not a non-negative number!'),
'error_incorrect_port' => __('Not a valid port number!'),
'error_invalid_value' => __('Incorrect value!'),
- 'error_value_lte' => __('Value must be equal or lower than %s!')];
+ 'error_value_lte' => __('Value must be equal or lower than %s!')
+ ];
$this->_configFile = $cf;
// initialize validators
Validator::getValidators($this->_configFile);
@@ -861,7 +862,8 @@ class FormDisplay
$funcs = [
'ZipDump' => ['zip_open', 'gzcompress'],
'GZipDump' => ['gzopen', 'gzencode'],
- 'BZipDump' => ['bzopen', 'bzcompress']];
+ 'BZipDump' => ['bzopen', 'bzcompress']
+ ];
if (!function_exists($funcs[$systemPath][0])) {
$comment = sprintf(
__(
diff --git a/libraries/classes/Config/Forms/Setup/FeaturesForm.php b/libraries/classes/Config/Forms/Setup/FeaturesForm.php
index b44422c189..325cc3efc1 100644
--- a/libraries/classes/Config/Forms/Setup/FeaturesForm.php
+++ b/libraries/classes/Config/Forms/Setup/FeaturesForm.php
@@ -31,8 +31,8 @@ class FeaturesForm extends \PhpMyAdmin\Config\Forms\User\FeaturesForm
'UploadDir',
'SaveDir',
'RecodingEngine' => ':group',
- 'IconvExtraParams',
- ':group:end',
+ 'IconvExtraParams',
+ ':group:end',
'ZipDump',
'GZipDump',
'BZipDump',
diff --git a/libraries/classes/Config/Forms/Setup/ServersForm.php b/libraries/classes/Config/Forms/Setup/ServersForm.php
index 5c3d8edb20..a394fd43a1 100644
--- a/libraries/classes/Config/Forms/Setup/ServersForm.php
+++ b/libraries/classes/Config/Forms/Setup/ServersForm.php
@@ -23,68 +23,92 @@ class ServersForm extends BaseForm
public static function getForms()
{
return [
- 'Server' => ['Servers' => [1 => [
- 'verbose',
- 'host',
- 'port',
- 'socket',
- 'ssl',
- 'compress']]],
- 'Server_auth' => ['Servers' => [1 => [
- 'auth_type',
- ':group:' . __('Config authentication'),
- 'user',
- 'password',
- ':group:end',
- ':group:' . __('HTTP authentication'),
- 'auth_http_realm',
- ':group:end',
- ':group:' . __('Signon authentication'),
- 'SignonSession',
- 'SignonURL',
- 'LogoutURL']]],
- 'Server_config' => ['Servers' => [1 => [
- 'only_db',
- 'hide_db',
- 'AllowRoot',
- 'AllowNoPassword',
- 'DisableIS',
- 'AllowDeny/order',
- 'AllowDeny/rules',
- 'SessionTimeZone']]],
- 'Server_pmadb' => ['Servers' => [1 => [
- 'pmadb' => 'phpmyadmin',
- 'controlhost',
- 'controlport',
- 'controluser',
- 'controlpass',
- 'bookmarktable' => 'pma__bookmark',
- 'relation' => 'pma__relation',
- 'userconfig' => 'pma__userconfig',
- 'users' => 'pma__users',
- 'usergroups' => 'pma__usergroups',
- 'navigationhiding' => 'pma__navigationhiding',
- 'table_info' => 'pma__table_info',
- 'column_info' => 'pma__column_info',
- 'history' => 'pma__history',
- 'recent' => 'pma__recent',
- 'favorite' => 'pma__favorite',
- 'table_uiprefs' => 'pma__table_uiprefs',
- 'tracking' => 'pma__tracking',
- 'table_coords' => 'pma__table_coords',
- 'pdf_pages' => 'pma__pdf_pages',
- 'savedsearches' => 'pma__savedsearches',
- 'central_columns' => 'pma__central_columns',
- 'designer_settings' => 'pma__designer_settings',
- 'export_templates' => 'pma__export_templates',
- 'MaxTableUiprefs' => 100]]],
- 'Server_tracking' => ['Servers' => [1 => [
- 'tracking_version_auto_create',
- 'tracking_default_statements',
- 'tracking_add_drop_view',
- 'tracking_add_drop_table',
- 'tracking_add_drop_database',
- ]]],
+ 'Server' => [
+ 'Servers' => [
+ 1 => [
+ 'verbose',
+ 'host',
+ 'port',
+ 'socket',
+ 'ssl',
+ 'compress'
+ ]
+ ]
+ ],
+ 'Server_auth' => [
+ 'Servers' => [
+ 1 => [
+ 'auth_type',
+ ':group:' . __('Config authentication'),
+ 'user',
+ 'password',
+ ':group:end',
+ ':group:' . __('HTTP authentication'),
+ 'auth_http_realm',
+ ':group:end',
+ ':group:' . __('Signon authentication'),
+ 'SignonSession',
+ 'SignonURL',
+ 'LogoutURL'
+ ]
+ ]
+ ],
+ 'Server_config' => [
+ 'Servers' => [
+ 1 => [
+ 'only_db',
+ 'hide_db',
+ 'AllowRoot',
+ 'AllowNoPassword',
+ 'DisableIS',
+ 'AllowDeny/order',
+ 'AllowDeny/rules',
+ 'SessionTimeZone'
+ ]
+ ]
+ ],
+ 'Server_pmadb' => [
+ 'Servers' => [
+ 1 => [
+ 'pmadb' => 'phpmyadmin',
+ 'controlhost',
+ 'controlport',
+ 'controluser',
+ 'controlpass',
+ 'bookmarktable' => 'pma__bookmark',
+ 'relation' => 'pma__relation',
+ 'userconfig' => 'pma__userconfig',
+ 'users' => 'pma__users',
+ 'usergroups' => 'pma__usergroups',
+ 'navigationhiding' => 'pma__navigationhiding',
+ 'table_info' => 'pma__table_info',
+ 'column_info' => 'pma__column_info',
+ 'history' => 'pma__history',
+ 'recent' => 'pma__recent',
+ 'favorite' => 'pma__favorite',
+ 'table_uiprefs' => 'pma__table_uiprefs',
+ 'tracking' => 'pma__tracking',
+ 'table_coords' => 'pma__table_coords',
+ 'pdf_pages' => 'pma__pdf_pages',
+ 'savedsearches' => 'pma__savedsearches',
+ 'central_columns' => 'pma__central_columns',
+ 'designer_settings' => 'pma__designer_settings',
+ 'export_templates' => 'pma__export_templates',
+ 'MaxTableUiprefs' => 100
+ ]
+ ]
+ ],
+ 'Server_tracking' => [
+ 'Servers' => [
+ 1 => [
+ 'tracking_version_auto_create',
+ 'tracking_default_statements',
+ 'tracking_add_drop_view',
+ 'tracking_add_drop_table',
+ 'tracking_add_drop_database',
+ ]
+ ]
+ ],
];
}
}
diff --git a/libraries/classes/Config/Forms/User/ExportForm.php b/libraries/classes/Config/Forms/User/ExportForm.php
index 8eb04a3a52..d2897133eb 100644
--- a/libraries/classes/Config/Forms/User/ExportForm.php
+++ b/libraries/classes/Config/Forms/User/ExportForm.php
@@ -26,29 +26,29 @@ class ExportForm extends BaseForm
'Export_defaults' => [
'Export/method',
':group:' . __('Quick'),
- 'Export/quick_export_onserver',
- 'Export/quick_export_onserver_overwrite',
- ':group:end',
+ 'Export/quick_export_onserver',
+ 'Export/quick_export_onserver_overwrite',
+ ':group:end',
':group:' . __('Custom'),
- 'Export/format',
- 'Export/compression',
- 'Export/charset',
- 'Export/lock_tables',
- 'Export/as_separate_files',
- 'Export/asfile' => ':group',
- 'Export/onserver',
- 'Export/onserver_overwrite',
- ':group:end',
- 'Export/file_template_table',
- 'Export/file_template_database',
- 'Export/file_template_server'
+ 'Export/format',
+ 'Export/compression',
+ 'Export/charset',
+ 'Export/lock_tables',
+ 'Export/as_separate_files',
+ 'Export/asfile' => ':group',
+ 'Export/onserver',
+ 'Export/onserver_overwrite',
+ ':group:end',
+ 'Export/file_template_table',
+ 'Export/file_template_database',
+ 'Export/file_template_server'
],
'Sql' => [
'Export/sql_include_comments' => ':group',
- 'Export/sql_dates',
- 'Export/sql_relation',
- 'Export/sql_mime',
- ':group:end',
+ 'Export/sql_dates',
+ 'Export/sql_relation',
+ 'Export/sql_mime',
+ ':group:end',
'Export/sql_use_transaction',
'Export/sql_disable_fk',
'Export/sql_views_as_tables',
@@ -56,93 +56,94 @@ class ExportForm extends BaseForm
'Export/sql_compatibility',
'Export/sql_structure_or_data',
':group:' . __('Structure'),
- 'Export/sql_drop_database',
- 'Export/sql_create_database',
- 'Export/sql_drop_table',
- 'Export/sql_create_table' => ':group',
- 'Export/sql_if_not_exists',
- 'Export/sql_auto_increment',
- ':group:end',
- 'Export/sql_create_view' => ':group',
- 'Export/sql_view_current_user',
- 'Export/sql_or_replace_view',
- ':group:end',
- 'Export/sql_procedure_function',
- 'Export/sql_create_trigger',
- 'Export/sql_backquotes',
- ':group:end',
+ 'Export/sql_drop_database',
+ 'Export/sql_create_database',
+ 'Export/sql_drop_table',
+ 'Export/sql_create_table' => ':group',
+ 'Export/sql_if_not_exists',
+ 'Export/sql_auto_increment',
+ ':group:end',
+ 'Export/sql_create_view' => ':group',
+ 'Export/sql_view_current_user',
+ 'Export/sql_or_replace_view',
+ ':group:end',
+ 'Export/sql_procedure_function',
+ 'Export/sql_create_trigger',
+ 'Export/sql_backquotes',
+ ':group:end',
':group:' . __('Data'),
- 'Export/sql_delayed',
- 'Export/sql_ignore',
- 'Export/sql_type',
- 'Export/sql_insert_syntax',
- 'Export/sql_max_query_size',
- 'Export/sql_hex_for_binary',
- 'Export/sql_utc_time'
+ 'Export/sql_delayed',
+ 'Export/sql_ignore',
+ 'Export/sql_type',
+ 'Export/sql_insert_syntax',
+ 'Export/sql_max_query_size',
+ 'Export/sql_hex_for_binary',
+ 'Export/sql_utc_time'
],
'CodeGen' => [
'Export/codegen_format'
],
'Csv' => [
':group:' . __('CSV'),
- 'Export/csv_separator',
- 'Export/csv_enclosed',
- 'Export/csv_escaped',
- 'Export/csv_terminated',
- 'Export/csv_null',
- 'Export/csv_removeCRLF',
- 'Export/csv_columns',
- ':group:end',
+ 'Export/csv_separator',
+ 'Export/csv_enclosed',
+ 'Export/csv_escaped',
+ 'Export/csv_terminated',
+ 'Export/csv_null',
+ 'Export/csv_removeCRLF',
+ 'Export/csv_columns',
+ ':group:end',
':group:' . __('CSV for MS Excel'),
- 'Export/excel_null',
- 'Export/excel_removeCRLF',
- 'Export/excel_columns',
- 'Export/excel_edition'
- ],
+ 'Export/excel_null',
+ 'Export/excel_removeCRLF',
+ 'Export/excel_columns',
+ 'Export/excel_edition'
+ ],
'Latex' => [
'Export/latex_caption',
'Export/latex_structure_or_data',
':group:' . __('Structure'),
- 'Export/latex_structure_caption',
- 'Export/latex_structure_continued_caption',
- 'Export/latex_structure_label',
- 'Export/latex_relation',
- 'Export/latex_comments',
- 'Export/latex_mime',
- ':group:end',
+ 'Export/latex_structure_caption',
+ 'Export/latex_structure_continued_caption',
+ 'Export/latex_structure_label',
+ 'Export/latex_relation',
+ 'Export/latex_comments',
+ 'Export/latex_mime',
+ ':group:end',
':group:' . __('Data'),
- 'Export/latex_columns',
- 'Export/latex_data_caption',
- 'Export/latex_data_continued_caption',
- 'Export/latex_data_label',
- 'Export/latex_null'
+ 'Export/latex_columns',
+ 'Export/latex_data_caption',
+ 'Export/latex_data_continued_caption',
+ 'Export/latex_data_label',
+ 'Export/latex_null'
],
'Microsoft_Office' => [
':group:' . __('Microsoft Word 2000'),
- 'Export/htmlword_structure_or_data',
- 'Export/htmlword_null',
- 'Export/htmlword_columns'],
+ 'Export/htmlword_structure_or_data',
+ 'Export/htmlword_null',
+ 'Export/htmlword_columns'
+ ],
'Open_Document' => [
':group:' . __('OpenDocument Spreadsheet'),
- 'Export/ods_columns',
- 'Export/ods_null',
- ':group:end',
+ 'Export/ods_columns',
+ 'Export/ods_null',
+ ':group:end',
':group:' . __('OpenDocument Text'),
- 'Export/odt_structure_or_data',
- ':group:' . __('Structure'),
- 'Export/odt_relation',
- 'Export/odt_comments',
- 'Export/odt_mime',
- ':group:end',
- ':group:' . __('Data'),
- 'Export/odt_columns',
- 'Export/odt_null'
+ 'Export/odt_structure_or_data',
+ ':group:' . __('Structure'),
+ 'Export/odt_relation',
+ 'Export/odt_comments',
+ 'Export/odt_mime',
+ ':group:end',
+ ':group:' . __('Data'),
+ 'Export/odt_columns',
+ 'Export/odt_null'
],
'Texy' => [
'Export/texytext_structure_or_data',
':group:' . __('Data'),
- 'Export/texytext_null',
- 'Export/texytext_columns'
+ 'Export/texytext_null',
+ 'Export/texytext_columns'
],
];
}
diff --git a/libraries/classes/Config/Forms/User/ImportForm.php b/libraries/classes/Config/Forms/User/ImportForm.php
index 1853e33b28..81351f31f6 100644
--- a/libraries/classes/Config/Forms/User/ImportForm.php
+++ b/libraries/classes/Config/Forms/User/ImportForm.php
@@ -37,27 +37,27 @@ class ImportForm extends BaseForm
],
'Csv' => [
':group:' . __('CSV'),
- 'Import/csv_replace',
- 'Import/csv_ignore',
- 'Import/csv_terminated',
- 'Import/csv_enclosed',
- 'Import/csv_escaped',
- 'Import/csv_col_names',
- ':group:end',
+ 'Import/csv_replace',
+ 'Import/csv_ignore',
+ 'Import/csv_terminated',
+ 'Import/csv_enclosed',
+ 'Import/csv_escaped',
+ 'Import/csv_col_names',
+ ':group:end',
':group:' . __('CSV using LOAD DATA'),
- 'Import/ldi_replace',
- 'Import/ldi_ignore',
- 'Import/ldi_terminated',
- 'Import/ldi_enclosed',
- 'Import/ldi_escaped',
- 'Import/ldi_local_option'
+ 'Import/ldi_replace',
+ 'Import/ldi_ignore',
+ 'Import/ldi_terminated',
+ 'Import/ldi_enclosed',
+ 'Import/ldi_escaped',
+ 'Import/ldi_local_option'
],
'Open_Document' => [
':group:' . __('OpenDocument Spreadsheet'),
- 'Import/ods_col_names',
- 'Import/ods_empty_rows',
- 'Import/ods_recognize_percentages',
- 'Import/ods_recognize_currency'
+ 'Import/ods_col_names',
+ 'Import/ods_empty_rows',
+ 'Import/ods_recognize_percentages',
+ 'Import/ods_recognize_currency'
],
];
diff --git a/libraries/classes/Config/Validator.php b/libraries/classes/Config/Validator.php
index 436bc95043..7ee7daa2e7 100644
--- a/libraries/classes/Config/Validator.php
+++ b/libraries/classes/Config/Validator.php
@@ -585,9 +585,11 @@ class Validator
public static function validateUpperBound($path, array $values, $maxValue)
{
$result = $values[$path] <= $maxValue;
- return [$path => ($result ? '' : sprintf(
- __('Value must be equal or lower than %s!'),
- $maxValue
- ))];
+ return [
+ $path => $result ? '' : sprintf(
+ __('Value must be equal or lower than %s!'),
+ $maxValue
+ )
+ ];
}
}
diff --git a/libraries/classes/Controllers/Database/DatabaseStructureController.php b/libraries/classes/Controllers/Database/DatabaseStructureController.php
index 65dbdb270a..bde22aa384 100644
--- a/libraries/classes/Controllers/Database/DatabaseStructureController.php
+++ b/libraries/classes/Controllers/Database/DatabaseStructureController.php
@@ -187,7 +187,8 @@ class DatabaseStructureController extends DatabaseController
$this->response->addHTML('
');
$_url_params = [
'pos' => $this->_pos,
- 'db' => $this->db];
+ 'db' => $this->db
+ ];
// Add the sort options if they exists
if (isset($_REQUEST['sort'])) {
diff --git a/libraries/classes/Controllers/Table/TableStructureController.php b/libraries/classes/Controllers/Table/TableStructureController.php
index 9acdb5ebe6..50dc5f5f60 100644
--- a/libraries/classes/Controllers/Table/TableStructureController.php
+++ b/libraries/classes/Controllers/Table/TableStructureController.php
@@ -293,10 +293,7 @@ class TableStructureController extends TableController
*/
if (isset($_POST['do_save_data'])) {
$regenerate = $this->updateColumns();
- if ($regenerate) {
- // This happens when updating failed
- // @todo: do something appropriate
- } else {
+ if (! $regenerate) {
// continue to show the table's structure
unset($_POST['selected']);
}
diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php
index 3d9ac642f1..f92a03be4a 100644
--- a/libraries/classes/Display/Results.php
+++ b/libraries/classes/Display/Results.php
@@ -3445,13 +3445,13 @@ class Results
) {
$_url_params = [
- 'db' => $this->__get('db'),
- 'table' => $this->__get('table'),
- 'where_clause' => $where_clause,
- 'clause_is_unique' => $clause_is_unique,
- 'sql_query' => $url_sql_query,
- 'goto' => 'sql.php',
- ];
+ 'db' => $this->__get('db'),
+ 'table' => $this->__get('table'),
+ 'where_clause' => $where_clause,
+ 'clause_is_unique' => $clause_is_unique,
+ 'sql_query' => $url_sql_query,
+ 'goto' => 'sql.php',
+ ];
$edit_url = 'tbl_change.php'
. Url::getCommon(
@@ -3525,12 +3525,12 @@ class Results
($clause_is_unique ? '' : ' LIMIT 1');
$_url_params = [
- 'db' => $this->__get('db'),
- 'table' => $this->__get('table'),
- 'sql_query' => $del_query,
- 'message_to_show' => __('The row has been deleted.'),
- 'goto' => $lnk_goto,
- ];
+ 'db' => $this->__get('db'),
+ 'table' => $this->__get('table'),
+ 'sql_query' => $del_query,
+ 'message_to_show' => __('The row has been deleted.'),
+ 'goto' => $lnk_goto,
+ ];
$del_url = 'sql.php' . Url::getCommon($_url_params);
$js_conf = 'DELETE FROM ' . Sanitize::jsFormat($this->__get('table'))
@@ -3540,21 +3540,21 @@ class Results
$del_str = $this->_getActionLinkContent('b_drop', __('Delete'));
} elseif ($del_lnk == self::KILL_PROCESS) { // kill process case
$_url_params = [
- 'db' => $this->__get('db'),
- 'table' => $this->__get('table'),
- 'sql_query' => $url_sql_query,
- 'goto' => 'index.php',
- ];
+ 'db' => $this->__get('db'),
+ 'table' => $this->__get('table'),
+ 'sql_query' => $url_sql_query,
+ 'goto' => 'index.php',
+ ];
$lnk_goto = 'sql.php' . Url::getCommonRaw($_url_params);
$kill = $GLOBALS['dbi']->getKillQuery($row[0]);
$_url_params = [
- 'db' => 'mysql',
- 'sql_query' => $kill,
- 'goto' => $lnk_goto,
- ];
+ 'db' => 'mysql',
+ 'sql_query' => $kill,
+ 'goto' => $lnk_goto,
+ ];
$del_url = 'sql.php' . Url::getCommon($_url_params);
$js_conf = $kill;
@@ -4236,9 +4236,7 @@ class Results
} elseif (isset($_REQUEST['display_options_form'])) {
// we know that the checkbox was unchecked
unset($query['display_binary']);
- } elseif (isset($_REQUEST['full_text_button'])) {
- // do nothing to keep the value that is there in the session
- } else {
+ } elseif (! isset($_REQUEST['full_text_button'])) {
// selected by default because some operations like OPTIMIZE TABLE
// and all queries involving functions return "binary" contents,
// according to low-level field flags
@@ -5165,11 +5163,11 @@ class Results
. __('Query results operations') . '';
$_url_params = [
- 'db' => $this->__get('db'),
- 'table' => $this->__get('table'),
- 'printview' => '1',
- 'sql_query' => $this->__get('sql_query'),
- ];
+ 'db' => $this->__get('db'),
+ 'table' => $this->__get('table'),
+ 'printview' => '1',
+ 'sql_query' => $this->__get('sql_query'),
+ ];
$url_query = Url::getCommon($_url_params);
if (!$header_shown) {
diff --git a/libraries/classes/Import.php b/libraries/classes/Import.php
index d0344c40a0..aeac309472 100644
--- a/libraries/classes/Import.php
+++ b/libraries/classes/Import.php
@@ -1261,8 +1261,8 @@ class Import
$num_tables = count($tables);
for ($i = 0; $i < $num_tables; ++$i) {
$params = [
- 'db' => (string) $db_name,
- 'table' => (string) $tables[$i][self::TBL_NAME]
+ 'db' => (string) $db_name,
+ 'table' => (string) $tables[$i][self::TBL_NAME]
];
$tbl_url = 'sql.php' . Url::getCommon($params);
$tbl_struct_url = 'tbl_structure.php' . Url::getCommon($params);
diff --git a/libraries/classes/InsertEdit.php b/libraries/classes/InsertEdit.php
index 776e387664..a7b0284c66 100644
--- a/libraries/classes/InsertEdit.php
+++ b/libraries/classes/InsertEdit.php
@@ -1457,16 +1457,17 @@ class InsertEdit
$the_class = 'textfield';
// verify True_Type which does not contain the parentheses and length
- if ($readOnly) {
- //NOOP. Disable date/timepicker
- } elseif ($column['True_Type'] === 'date') {
- $the_class .= ' datefield';
- } elseif ($column['True_Type'] === 'time') {
- $the_class .= ' timefield';
- } elseif ($column['True_Type'] === 'datetime'
- || $column['True_Type'] === 'timestamp'
- ) {
- $the_class .= ' datetimefield';
+ if (! $readOnly) {
+ if ($column['True_Type'] === 'date') {
+ $the_class .= ' datefield';
+ } elseif ($column['True_Type'] === 'time') {
+ $the_class .= ' timefield';
+ } elseif (
+ $column['True_Type'] === 'datetime'
+ || $column['True_Type'] === 'timestamp'
+ ) {
+ $the_class .= ' datetimefield';
+ }
}
$input_min_max = false;
if (in_array($column['True_Type'], $this->dbi->types->getIntegerTypes())) {
@@ -1668,14 +1669,6 @@ class InsertEdit
$html_output .= '
';
}
- if ($column['pma_type'] == 'date'
- || $column['pma_type'] == 'datetime'
- || substr($column['pma_type'], 0, 9) == 'timestamp'
- ) {
- // the _3 suffix points to the date field
- // the _2 suffix points to the corresponding NULL checkbox
- // in dateFormat, 'yy' means the year with 4 digits
- }
}
return $html_output;
}
@@ -2646,13 +2639,13 @@ class InsertEdit
$query_values[]
= Util::backquote($multi_edit_columns_name[$key])
. ' = ' . $current_value_as_an_array;
- } elseif (empty($multi_edit_funcs[$key])
+ } elseif (
+ ! (empty($multi_edit_funcs[$key])
&& isset($multi_edit_columns_prev[$key])
&& (("'" . $this->dbi->escapeString($multi_edit_columns_prev[$key]) . "'" === $current_value)
- || ('0x' . $multi_edit_columns_prev[$key] === $current_value))
+ || ('0x' . $multi_edit_columns_prev[$key] === $current_value)))
+ && ! empty($current_value)
) {
- // No change for this column and no MySQL function is used -> next column
- } elseif (! empty($current_value)) {
// avoid setting a field to NULL when it's already NULL
// (field had the null checkbox before the update
// field still has the null checkbox)
diff --git a/libraries/classes/Normalization.php b/libraries/classes/Normalization.php
index a3ca6a52ab..67b9675753 100644
--- a/libraries/classes/Normalization.php
+++ b/libraries/classes/Normalization.php
@@ -880,9 +880,10 @@ class Normalization
$htmlOutput .= '
' . __('Select up to what step you want to normalize')
. '
';
$choices = [
- '1nf' => __('First step of normalization (1NF)'),
- '2nf' => __('Second step of normalization (1NF+2NF)'),
- '3nf' => __('Third step of normalization (1NF+2NF+3NF)')];
+ '1nf' => __('First step of normalization (1NF)'),
+ '2nf' => __('Second step of normalization (1NF+2NF)'),
+ '3nf' => __('Third step of normalization (1NF+2NF+3NF)')
+ ];
$htmlOutput .= Util::getRadioFields(
'normalizeTo',
diff --git a/libraries/classes/Operations.php b/libraries/classes/Operations.php
index f4a50ba38a..6fabbc3f09 100644
--- a/libraries/classes/Operations.php
+++ b/libraries/classes/Operations.php
@@ -1265,16 +1265,16 @@ class Operations
'PAGE' => 'PAGE'
],
'MYISAM' => [
- 'FIXED' => 'FIXED',
- 'DYNAMIC' => 'DYNAMIC'
+ 'FIXED' => 'FIXED',
+ 'DYNAMIC' => 'DYNAMIC'
],
'PBXT' => [
- 'FIXED' => 'FIXED',
- 'DYNAMIC' => 'DYNAMIC'
+ 'FIXED' => 'FIXED',
+ 'DYNAMIC' => 'DYNAMIC'
],
'INNODB' => [
- 'COMPACT' => 'COMPACT',
- 'REDUNDANT' => 'REDUNDANT'
+ 'COMPACT' => 'COMPACT',
+ 'REDUNDANT' => 'REDUNDANT'
]
];
@@ -2200,12 +2200,6 @@ class Operations
$new = Util::backquote($_POST['target_db']) . '.'
. Util::backquote($new_name);
$message->addParam($new);
-
- /* Check: Work on new table or on old table? */
- if (isset($_POST['submit_move'])
- || Core::isValid($_POST['switch_to_new'])
- ) {
- }
}
} else {
/**
diff --git a/libraries/classes/Plugins/Auth/AuthenticationCookie.php b/libraries/classes/Plugins/Auth/AuthenticationCookie.php
index afd1f30f15..9a923d5b3c 100644
--- a/libraries/classes/Plugins/Auth/AuthenticationCookie.php
+++ b/libraries/classes/Plugins/Auth/AuthenticationCookie.php
@@ -131,11 +131,17 @@ class AuthenticationCookie extends AuthenticationPlugin
// wrap the login form in a div which overlays the whole page.
if ($session_expired) {
- echo $this->template->render('login/header', ['theme' => $GLOBALS['PMA_Theme'],
- 'add_class' => ' modal_form', 'session_expired' => 1]);
+ echo $this->template->render('login/header', [
+ 'theme' => $GLOBALS['PMA_Theme'],
+ 'add_class' => ' modal_form',
+ 'session_expired' => 1
+ ]);
} else {
- echo $this->template->render('login/header', ['theme' => $GLOBALS['PMA_Theme'],
- 'add_class' => '', 'session_expired' => 0]);
+ echo $this->template->render('login/header', [
+ 'theme' => $GLOBALS['PMA_Theme'],
+ 'add_class' => '',
+ 'session_expired' => 0
+ ]);
}
if ($GLOBALS['cfg']['DBG']['demo']) {
@@ -770,8 +776,9 @@ class AuthenticationCookie extends AuthenticationPlugin
public function cleanSSLErrors()
{
if (function_exists('openssl_error_string')) {
- while (($ssl_err = openssl_error_string()) !== false) {
- }
+ do {
+ $hasSslErrors = openssl_error_string();
+ } while ($hasSslErrors !== false);
}
}
diff --git a/libraries/classes/Plugins/Import/ImportCsv.php b/libraries/classes/Plugins/Import/ImportCsv.php
index dbcdc23f04..cd4455efed 100644
--- a/libraries/classes/Plugins/Import/ImportCsv.php
+++ b/libraries/classes/Plugins/Import/ImportCsv.php
@@ -299,9 +299,7 @@ class ImportCsv extends AbstractImportCsv
// subtract data we didn't handle yet and stop processing
$GLOBALS['offset'] -= strlen($buffer);
break;
- } elseif ($data === true) {
- // Handle rest of buffer
- } else {
+ } elseif ($data !== true) {
// Append new data to buffer
$buffer .= $data;
unset($data);
diff --git a/libraries/classes/Plugins/Import/ImportMediawiki.php b/libraries/classes/Plugins/Import/ImportMediawiki.php
index 13b123753b..54c4a8e219 100644
--- a/libraries/classes/Plugins/Import/ImportMediawiki.php
+++ b/libraries/classes/Plugins/Import/ImportMediawiki.php
@@ -102,9 +102,7 @@ class ImportMediawiki extends ImportPlugin
// Subtract data we didn't handle yet and stop processing
$GLOBALS['offset'] -= mb_strlen($buffer);
break;
- } elseif ($data === true) {
- // Handle rest of buffer
- } else {
+ } elseif ($data !== true) {
// Append new data to buffer
$buffer = $data;
unset($data);
diff --git a/libraries/classes/Plugins/Import/ImportOds.php b/libraries/classes/Plugins/Import/ImportOds.php
index 57e1389000..d410c61510 100644
--- a/libraries/classes/Plugins/Import/ImportOds.php
+++ b/libraries/classes/Plugins/Import/ImportOds.php
@@ -121,9 +121,7 @@ class ImportOds extends ImportPlugin
/* subtract data we didn't handle yet and stop processing */
$GLOBALS['offset'] -= strlen($buffer);
break;
- } elseif ($data === true) {
- /* Handle rest of buffer */
- } else {
+ } elseif ($data !== true) {
/* Append new data to buffer */
$buffer .= $data;
unset($data);
diff --git a/libraries/classes/Plugins/Import/ImportXml.php b/libraries/classes/Plugins/Import/ImportXml.php
index 24213d3be4..800c77679a 100644
--- a/libraries/classes/Plugins/Import/ImportXml.php
+++ b/libraries/classes/Plugins/Import/ImportXml.php
@@ -78,9 +78,7 @@ class ImportXml extends ImportPlugin
/* subtract data we didn't handle yet and stop processing */
$GLOBALS['offset'] -= strlen($buffer);
break;
- } elseif ($data === true) {
- /* Handle rest of buffer */
- } else {
+ } elseif ($data !== true) {
/* Append new data to buffer */
$buffer .= $data;
unset($data);
diff --git a/libraries/classes/RecentFavoriteTable.php b/libraries/classes/RecentFavoriteTable.php
index f163e52e80..ca747e6e17 100644
--- a/libraries/classes/RecentFavoriteTable.php
+++ b/libraries/classes/RecentFavoriteTable.php
@@ -356,8 +356,11 @@ class RecentFavoriteTable
$cfgRelation = $this->relation->getRelationsParam();
// Not to show this once list is synchronized.
if ($cfgRelation['favoritework'] && ! isset($_SESSION['tmpval']['favorites_synced'][$server_id])) {
- $params = ['ajax_request' => true, 'favorite_table' => true,
- 'sync_favorite_tables' => true];
+ $params = [
+ 'ajax_request' => true,
+ 'favorite_table' => true,
+ 'sync_favorite_tables' => true
+ ];
$url = 'db_structure.php' . Url::getCommon($params);
$retval = '
';
diff --git a/libraries/classes/Relation.php b/libraries/classes/Relation.php
index 6f7327f957..0a997b4c78 100644
--- a/libraries/classes/Relation.php
+++ b/libraries/classes/Relation.php
@@ -753,10 +753,12 @@ class Relation
);
$this->dbi->tryMultiQuery($query, DatabaseInterface::CONNECT_CONTROL);
// skips result sets of query as we are not interested in it
- while ($this->dbi->moreResults(DatabaseInterface::CONNECT_CONTROL)
- && $this->dbi->nextResult(DatabaseInterface::CONNECT_CONTROL)
- ) {
- }
+ do {
+ $hasResult = (
+ $this->dbi->moreResults(DatabaseInterface::CONNECT_CONTROL)
+ && $this->dbi->nextResult(DatabaseInterface::CONNECT_CONTROL)
+ );
+ } while ($hasResult);
$error = $this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
// return true if no error exists otherwise false
return empty($error);
diff --git a/libraries/classes/ReplicationGui.php b/libraries/classes/ReplicationGui.php
index a0887575bb..fc52a34fdb 100644
--- a/libraries/classes/ReplicationGui.php
+++ b/libraries/classes/ReplicationGui.php
@@ -475,7 +475,7 @@ class ReplicationGui
'maxlength' => 6,
'value' => '3306',
'required' => 'required'
- ]
+ ]
);
$html .= ' ';
@@ -592,7 +592,8 @@ class ReplicationGui
$variables_wrap = [
'Replicate_Do_DB', 'Replicate_Ignore_DB',
'Replicate_Do_Table', 'Replicate_Ignore_Table',
- 'Replicate_Wild_Do_Table', 'Replicate_Wild_Ignore_Table'];
+ 'Replicate_Wild_Do_Table', 'Replicate_Wild_Ignore_Table'
+ ];
if (in_array($variable, $variables_wrap)) {
$html .= htmlspecialchars(str_replace(
',',
diff --git a/libraries/classes/Rte/Events.php b/libraries/classes/Rte/Events.php
index ec52151645..cdf2992df1 100644
--- a/libraries/classes/Rte/Events.php
+++ b/libraries/classes/Rte/Events.php
@@ -317,18 +317,20 @@ class Events
public function getDataFromRequest()
{
$retval = [];
- $indices = ['item_name',
- 'item_original_name',
- 'item_status',
- 'item_execute_at',
- 'item_interval_value',
- 'item_interval_field',
- 'item_starts',
- 'item_ends',
- 'item_definition',
- 'item_preserve',
- 'item_comment',
- 'item_definer'];
+ $indices = [
+ 'item_name',
+ 'item_original_name',
+ 'item_status',
+ 'item_execute_at',
+ 'item_interval_value',
+ 'item_interval_field',
+ 'item_starts',
+ 'item_ends',
+ 'item_definition',
+ 'item_preserve',
+ 'item_comment',
+ 'item_definer'
+ ];
foreach ($indices as $index) {
$retval[$index] = isset($_POST[$index]) ? $_POST[$index] : '';
}
@@ -412,17 +414,17 @@ class Events
// Escape special characters
$need_escape = [
- 'item_original_name',
- 'item_name',
- 'item_type',
- 'item_execute_at',
- 'item_interval_value',
- 'item_starts',
- 'item_ends',
- 'item_definition',
- 'item_definer',
- 'item_comment'
- ];
+ 'item_original_name',
+ 'item_name',
+ 'item_type',
+ 'item_execute_at',
+ 'item_interval_value',
+ 'item_starts',
+ 'item_ends',
+ 'item_definition',
+ 'item_definer',
+ '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 15a20e70a6..a948c032be 100644
--- a/libraries/classes/Rte/Footer.php
+++ b/libraries/classes/Rte/Footer.php
@@ -122,17 +122,17 @@ class Footer
);
$es_state = mb_strtolower($es_state);
$options = [
- 0 => [
- 'label' => __('OFF'),
- 'value' => "SET GLOBAL event_scheduler=\"OFF\"",
- 'selected' => ($es_state != 'on')
- ],
- 1 => [
- 'label' => __('ON'),
- 'value' => "SET GLOBAL event_scheduler=\"ON\"",
- 'selected' => ($es_state == 'on')
- ]
- ];
+ 0 => [
+ 'label' => __('OFF'),
+ 'value' => "SET GLOBAL event_scheduler=\"OFF\"",
+ 'selected' => ($es_state != 'on')
+ ],
+ 1 => [
+ 'label' => __('ON'),
+ 'value' => "SET GLOBAL event_scheduler=\"ON\"",
+ 'selected' => ($es_state == 'on')
+ ]
+ ];
// Generate output
$retval = "\n";
$retval .= "
\n";
diff --git a/libraries/classes/Rte/Routines.php b/libraries/classes/Rte/Routines.php
index 3d843911b1..95ad107f31 100644
--- a/libraries/classes/Rte/Routines.php
+++ b/libraries/classes/Rte/Routines.php
@@ -528,14 +528,16 @@ class Routines
global $param_directions, $param_sqldataaccess;
$retval = [];
- $indices = ['item_name',
- 'item_original_name',
- 'item_returnlength',
- 'item_returnopts_num',
- 'item_returnopts_text',
- 'item_definition',
- 'item_comment',
- 'item_definer'];
+ $indices = [
+ 'item_name',
+ 'item_original_name',
+ 'item_returnlength',
+ 'item_returnopts_num',
+ 'item_returnopts_text',
+ 'item_definition',
+ 'item_comment',
+ 'item_definer'
+ ];
foreach ($indices as $index) {
$retval[$index] = isset($_POST[$index]) ? $_POST[$index] : '';
}
diff --git a/libraries/classes/Rte/Triggers.php b/libraries/classes/Rte/Triggers.php
index 3cae03d48f..e52934a147 100644
--- a/libraries/classes/Rte/Triggers.php
+++ b/libraries/classes/Rte/Triggers.php
@@ -295,13 +295,15 @@ class Triggers
public function getDataFromRequest()
{
$retval = [];
- $indices = ['item_name',
- 'item_table',
- 'item_original_name',
- 'item_action_timing',
- 'item_event_manipulation',
- 'item_definition',
- 'item_definer'];
+ $indices = [
+ 'item_name',
+ 'item_table',
+ 'item_original_name',
+ 'item_action_timing',
+ 'item_event_manipulation',
+ 'item_definition',
+ 'item_definer'
+ ];
foreach ($indices as $index) {
$retval[$index] = isset($_POST[$index]) ? $_POST[$index] : '';
}
@@ -362,11 +364,11 @@ class Triggers
// Escape special characters
$need_escape = [
- 'item_original_name',
- 'item_name',
- 'item_definition',
- 'item_definer'
- ];
+ 'item_original_name',
+ 'item_name',
+ 'item_definition',
+ 'item_definer'
+ ];
foreach ($need_escape as $key => $index) {
$item[$index] = htmlentities($item[$index], ENT_QUOTES, 'UTF-8');
}
diff --git a/libraries/classes/Rte/Words.php b/libraries/classes/Rte/Words.php
index f96b5e15fc..f308003479 100644
--- a/libraries/classes/Rte/Words.php
+++ b/libraries/classes/Rte/Words.php
@@ -31,13 +31,13 @@ class Words
switch ($_PMA_RTE) {
case 'RTN':
$words = [
- 'add' => __('Add routine'),
- 'docu' => 'STORED_ROUTINES',
- 'export' => __('Export of routine %s'),
- 'human' => __('routine'),
- 'no_create' => __(
- 'You do not have the necessary privileges to create a routine.'
- ),
+ 'add' => __('Add routine'),
+ 'docu' => 'STORED_ROUTINES',
+ 'export' => __('Export of routine %s'),
+ 'human' => __('routine'),
+ 'no_create' => __(
+ 'You do not have the necessary privileges to create a routine.'
+ ),
'no_edit' => __(
'No routine with name %1$s found in database %2$s. '
. 'You might be lacking the necessary privileges to edit this routine.'
@@ -53,13 +53,13 @@ class Words
break;
case 'TRI':
$words = [
- 'add' => __('Add trigger'),
- 'docu' => 'TRIGGERS',
- 'export' => __('Export of trigger %s'),
- 'human' => __('trigger'),
- 'no_create' => __(
- 'You do not have the necessary privileges to create a trigger.'
- ),
+ 'add' => __('Add trigger'),
+ 'docu' => 'TRIGGERS',
+ 'export' => __('Export of trigger %s'),
+ 'human' => __('trigger'),
+ 'no_create' => __(
+ 'You do not have the necessary privileges to create a trigger.'
+ ),
'not_found' => __('No trigger with name %1$s found in database %2$s.'),
'nothing' => __('There are no triggers to display.'),
'title' => __('Triggers'),
@@ -67,13 +67,13 @@ class Words
break;
case 'EVN':
$words = [
- 'add' => __('Add event'),
- 'docu' => 'EVENTS',
- 'export' => __('Export of event %s'),
- 'human' => __('event'),
- 'no_create' => __(
- 'You do not have the necessary privileges to create an event.'
- ),
+ 'add' => __('Add event'),
+ 'docu' => 'EVENTS',
+ 'export' => __('Export of event %s'),
+ 'human' => __('event'),
+ 'no_create' => __(
+ 'You do not have the necessary privileges to create an event.'
+ ),
'not_found' => __('No event with name %1$s found in database %2$s.'),
'nothing' => __('There are no events to display.'),
'title' => __('Events'),
diff --git a/libraries/classes/Sql.php b/libraries/classes/Sql.php
index 0bbb43956a..2d5afac7b9 100644
--- a/libraries/classes/Sql.php
+++ b/libraries/classes/Sql.php
@@ -235,9 +235,9 @@ class Sql
//Handle the case when number of values
//is more than $cfg['ForeignKeyMaxLimit']
$_url_params = [
- 'db' => $db,
- 'table' => $table,
- 'field' => $column
+ 'db' => $db,
+ 'table' => $table,
+ 'field' => $column
];
$dropdown = '
'
diff --git a/libraries/classes/Tracker.php b/libraries/classes/Tracker.php
index 498124a6ce..8dbbb35d83 100644
--- a/libraries/classes/Tracker.php
+++ b/libraries/classes/Tracker.php
@@ -591,9 +591,11 @@ class Tracker
}
$statement = rtrim(mb_strstr($log_entry, "\n"));
- $ddlog[] = [ 'date' => $date,
- 'username' => $username,
- 'statement' => $statement ];
+ $ddlog[] = [
+ 'date' => $date,
+ 'username' => $username,
+ 'statement' => $statement
+ ];
}
}
@@ -621,9 +623,11 @@ class Tracker
}
$statement = rtrim(mb_strstr($log_entry, "\n"));
- $dmlog[] = [ 'date' => $date,
- 'username' => $username,
- 'statement' => $statement ];
+ $dmlog[] = [
+ 'date' => $date,
+ 'username' => $username,
+ 'statement' => $statement
+ ];
}
}
@@ -719,8 +723,7 @@ class Tracker
$result['tablename'] = $statement->body[3]->value == '.' ? $statement->body[4]->value
: $statement->body[2]->value ;
}
- } // Parse ALTER statement
- elseif ($statement instanceof AlterStatement) {
+ } elseif ($statement instanceof AlterStatement) { // Parse ALTER statement
if (empty($options) || !isset($options[3])) {
return $result;
}
@@ -734,8 +737,7 @@ class Tracker
$GLOBALS['db'] = $statement->table->table ;
}
- } // Parse DROP statement
- elseif ($statement instanceof DropStatement) {
+ } elseif ($statement instanceof DropStatement) { // Parse DROP statement
if (empty($options) || !isset($options[1])) {
return $result;
}
@@ -752,8 +754,7 @@ class Tracker
$result['identifier'] = 'DROP INDEX' ;
$result['tablename'] = $statement->table->table;
}
- } // Prase RENAME statement
- elseif ($statement instanceof RenameStatement) {
+ } elseif ($statement instanceof RenameStatement) { // Parse RENAME statement
$result['identifier'] = 'RENAME TABLE';
$result['tablename'] = $statement->renames[0]->old->table;
$result['tablename_after_rename'] = $statement->renames[0]->new->table;
diff --git a/libraries/classes/Twig/I18nExtension.php b/libraries/classes/Twig/I18nExtension.php
index b89c7473dd..8e89fb9eca 100644
--- a/libraries/classes/Twig/I18nExtension.php
+++ b/libraries/classes/Twig/I18nExtension.php
@@ -38,7 +38,7 @@ class I18nExtension extends TwigI18nExtension
public function getFilters()
{
return [
- new TwigFilter('trans', '_gettext'),
+ new TwigFilter('trans', '_gettext'),
];
}
}
diff --git a/libraries/classes/Types.php b/libraries/classes/Types.php
index be12365f5b..1060860f5d 100644
--- a/libraries/classes/Types.php
+++ b/libraries/classes/Types.php
@@ -478,40 +478,40 @@ class Types
switch ($class) {
case 'CHAR':
$ret = [
- 'AES_DECRYPT',
- 'AES_ENCRYPT',
- 'BIN',
- 'CHAR',
- 'COMPRESS',
- 'CURRENT_USER',
- 'DATABASE',
- 'DAYNAME',
- 'DES_DECRYPT',
- 'DES_ENCRYPT',
- 'ENCRYPT',
- 'HEX',
- 'INET6_NTOA',
- 'INET_NTOA',
- 'LOAD_FILE',
- 'LOWER',
- 'LTRIM',
- 'MD5',
- 'MONTHNAME',
- 'OLD_PASSWORD',
- 'PASSWORD',
- 'QUOTE',
- 'REVERSE',
- 'RTRIM',
- 'SHA1',
- 'SOUNDEX',
- 'SPACE',
- 'TRIM',
- 'UNCOMPRESS',
- 'UNHEX',
- 'UPPER',
- 'USER',
- 'UUID',
- 'VERSION',
+ 'AES_DECRYPT',
+ 'AES_ENCRYPT',
+ 'BIN',
+ 'CHAR',
+ 'COMPRESS',
+ 'CURRENT_USER',
+ 'DATABASE',
+ 'DAYNAME',
+ 'DES_DECRYPT',
+ 'DES_ENCRYPT',
+ 'ENCRYPT',
+ 'HEX',
+ 'INET6_NTOA',
+ 'INET_NTOA',
+ 'LOAD_FILE',
+ 'LOWER',
+ 'LTRIM',
+ 'MD5',
+ 'MONTHNAME',
+ 'OLD_PASSWORD',
+ 'PASSWORD',
+ 'QUOTE',
+ 'REVERSE',
+ 'RTRIM',
+ 'SHA1',
+ 'SOUNDEX',
+ 'SPACE',
+ 'TRIM',
+ 'UNCOMPRESS',
+ 'UNHEX',
+ 'UPPER',
+ 'USER',
+ 'UUID',
+ 'VERSION',
];
if (($isMariaDB && $serverVersion < 100012)
@@ -523,77 +523,77 @@ class Types
case 'DATE':
return [
- 'CURRENT_DATE',
- 'CURRENT_TIME',
- 'DATE',
- 'FROM_DAYS',
- 'FROM_UNIXTIME',
- 'LAST_DAY',
- 'NOW',
- 'SEC_TO_TIME',
- 'SYSDATE',
- 'TIME',
- 'TIMESTAMP',
- 'UTC_DATE',
- 'UTC_TIME',
- 'UTC_TIMESTAMP',
- 'YEAR',
+ 'CURRENT_DATE',
+ 'CURRENT_TIME',
+ 'DATE',
+ 'FROM_DAYS',
+ 'FROM_UNIXTIME',
+ 'LAST_DAY',
+ 'NOW',
+ 'SEC_TO_TIME',
+ 'SYSDATE',
+ 'TIME',
+ 'TIMESTAMP',
+ 'UTC_DATE',
+ 'UTC_TIME',
+ 'UTC_TIMESTAMP',
+ 'YEAR',
];
case 'NUMBER':
$ret = [
- 'ABS',
- 'ACOS',
- 'ASCII',
- 'ASIN',
- 'ATAN',
- 'BIT_LENGTH',
- 'BIT_COUNT',
- 'CEILING',
- 'CHAR_LENGTH',
- 'CONNECTION_ID',
- 'COS',
- 'COT',
- 'CRC32',
- 'DAYOFMONTH',
- 'DAYOFWEEK',
- 'DAYOFYEAR',
- 'DEGREES',
- 'EXP',
- 'FLOOR',
- 'HOUR',
- 'INET6_ATON',
- 'INET_ATON',
- 'LENGTH',
- 'LN',
- 'LOG',
- 'LOG2',
- 'LOG10',
- 'MICROSECOND',
- 'MINUTE',
- 'MONTH',
- 'OCT',
- 'ORD',
- 'PI',
- 'QUARTER',
- 'RADIANS',
- 'RAND',
- 'ROUND',
- 'SECOND',
- 'SIGN',
- 'SIN',
- 'SQRT',
- 'TAN',
- 'TO_DAYS',
- 'TO_SECONDS',
- 'TIME_TO_SEC',
- 'UNCOMPRESSED_LENGTH',
- 'UNIX_TIMESTAMP',
- 'UUID_SHORT',
- 'WEEK',
- 'WEEKDAY',
- 'WEEKOFYEAR',
- 'YEARWEEK',
+ 'ABS',
+ 'ACOS',
+ 'ASCII',
+ 'ASIN',
+ 'ATAN',
+ 'BIT_LENGTH',
+ 'BIT_COUNT',
+ 'CEILING',
+ 'CHAR_LENGTH',
+ 'CONNECTION_ID',
+ 'COS',
+ 'COT',
+ 'CRC32',
+ 'DAYOFMONTH',
+ 'DAYOFWEEK',
+ 'DAYOFYEAR',
+ 'DEGREES',
+ 'EXP',
+ 'FLOOR',
+ 'HOUR',
+ 'INET6_ATON',
+ 'INET_ATON',
+ 'LENGTH',
+ 'LN',
+ 'LOG',
+ 'LOG2',
+ 'LOG10',
+ 'MICROSECOND',
+ 'MINUTE',
+ 'MONTH',
+ 'OCT',
+ 'ORD',
+ 'PI',
+ 'QUARTER',
+ 'RADIANS',
+ 'RAND',
+ 'ROUND',
+ 'SECOND',
+ 'SIGN',
+ 'SIN',
+ 'SQRT',
+ 'TAN',
+ 'TO_DAYS',
+ 'TO_SECONDS',
+ 'TIME_TO_SEC',
+ 'UNCOMPRESSED_LENGTH',
+ 'UNIX_TIMESTAMP',
+ 'UUID_SHORT',
+ 'WEEK',
+ 'WEEKDAY',
+ 'WEEKOFYEAR',
+ 'YEARWEEK',
];
if (($isMariaDB && $serverVersion < 100012)
|| $serverVersion < 50603
@@ -604,24 +604,24 @@ class Types
case 'SPATIAL':
return [
- 'GeomFromText',
- 'GeomFromWKB',
+ 'GeomFromText',
+ 'GeomFromWKB',
- 'GeomCollFromText',
- 'LineFromText',
- 'MLineFromText',
- 'PointFromText',
- 'MPointFromText',
- 'PolyFromText',
- 'MPolyFromText',
+ 'GeomCollFromText',
+ 'LineFromText',
+ 'MLineFromText',
+ 'PointFromText',
+ 'MPointFromText',
+ 'PolyFromText',
+ 'MPolyFromText',
- 'GeomCollFromWKB',
- 'LineFromWKB',
- 'MLineFromWKB',
- 'PointFromWKB',
- 'MPointFromWKB',
- 'PolyFromWKB',
- 'MPolyFromWKB',
+ 'GeomCollFromWKB',
+ 'LineFromWKB',
+ 'MLineFromWKB',
+ 'PointFromWKB',
+ 'MPointFromWKB',
+ 'PolyFromWKB',
+ 'MPolyFromWKB',
];
}
return [];
@@ -760,7 +760,7 @@ class Types
if (($isMariaDB && $serverVersion > 100207)
|| (!$isMariaDB && $serverVersion >= 50708)) {
$ret['JSON'] = [
- 'JSON',
+ 'JSON',
];
}
diff --git a/libraries/classes/UserPreferences.php b/libraries/classes/UserPreferences.php
index 986d4ac953..693a2b867e 100644
--- a/libraries/classes/UserPreferences.php
+++ b/libraries/classes/UserPreferences.php
@@ -83,12 +83,14 @@ class UserPreferences
if (! isset($_SESSION['userconfig'])) {
$_SESSION['userconfig'] = [
'db' => [],
- 'ts' => time()];
+ 'ts' => time()
+ ];
}
return [
'config_data' => $_SESSION['userconfig']['db'],
'mtime' => $_SESSION['userconfig']['ts'],
- 'type' => 'session'];
+ 'type' => 'session'
+ ];
}
// load configuration from pmadb
$query_table = Util::backquote($cfgRelation['db']) . '.'
@@ -103,7 +105,8 @@ class UserPreferences
return [
'config_data' => $row ? json_decode($row['config_data'], true) : [],
'mtime' => $row ? $row['ts'] : time(),
- 'type' => 'db'];
+ 'type' => 'db'
+ ];
}
/**
@@ -124,7 +127,8 @@ class UserPreferences
// no pmadb table, use session storage
$_SESSION['userconfig'] = [
'db' => $config_array,
- 'ts' => time()];
+ 'ts' => time()
+ ];
if (isset($_SESSION['cache'][$cache_key]['userprefs'])) {
unset($_SESSION['cache'][$cache_key]['userprefs']);
}
diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php
index 052f88317c..bb04e02366 100644
--- a/libraries/classes/Util.php
+++ b/libraries/classes/Util.php
@@ -1554,7 +1554,8 @@ class Util
/* l10n: Short month name */
__('Nov'),
/* l10n: Short month name */
- __('Dec')];
+ __('Dec')
+ ];
$day_of_week = [
/* l10n: Short week day name */
_pgettext('Short week day name', 'Sun'),
@@ -1569,7 +1570,8 @@ class Util
/* l10n: Short week day name */
__('Fri'),
/* l10n: Short week day name */
- __('Sat')];
+ __('Sat')
+ ];
if ($format == '') {
/* l10n: See https://secure.php.net/manual/en/function.strftime.php */
@@ -2420,8 +2422,6 @@ class Util
if (self::showIcons('TableNavigationLinksMode')) {
$caption3 .= ' >';
$caption4 .= ' >>';
- if (! self::showText('TableNavigationLinksMode')) {
- }
}
$title3 = ' title="' . _pgettext('Next page', 'Next') . '"';
$title4 = ' title="' . _pgettext('Last page', 'End') . '"';
@@ -3255,7 +3255,7 @@ class Util
'@TABLE@' => $vars['table'],
'__TABLE__' => $vars['table'],
'@PHPMYADMIN@' => $vars['phpmyadmin_version'],
- ];
+ ];
/* Optional escaping */
if (! is_null($escape)) {
@@ -3609,8 +3609,6 @@ class Util
if ($geom_type == 'point') {
$funcs['X'] = ['params' => 1, 'type' => 'float'];
$funcs['Y'] = ['params' => 1, 'type' => 'float'];
- } elseif ($geom_type == 'multipoint') {
- // no functions here
} elseif ($geom_type == 'linestring') {
$funcs['EndPoint'] = ['params' => 1, 'type' => 'point'];
$funcs['GLength'] = ['params' => 1, 'type' => 'float'];
@@ -4477,15 +4475,7 @@ class Util
// (needed for proper working of the MaxTableList feature)
$tables = $GLOBALS['dbi']->getTables($db);
$total_num_tables = count($tables);
- if (isset($sub_part) && $sub_part == '_export') {
- // (don't fetch only a subset if we are coming from
- // db_export.php, because I think it's too risky to display only
- // a subset of the table names when exporting a db)
- /**
- *
- * @todo Page selector for table names?
- */
- } else {
+ if (! (isset($sub_part) && $sub_part == '_export')) {
// fetch the details for a possible limited subset
$limit_offset = $pos;
$limit_count = true;
diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php
index 2b627b475f..c028a3a510 100644
--- a/libraries/mult_submits.inc.php
+++ b/libraries/mult_submits.inc.php
@@ -146,16 +146,12 @@ if (! empty($submit_mult)
);
break;
} // end switch
- } elseif (isset($selected_fld) && !empty($selected_fld)) {
- // coming from table structure view - do something with
- // selected columns
- // handled in StructrueController
- } else {
+ } elseif (! (isset($selected_fld) && !empty($selected_fld))) {
// coming from browsing - do something with selected rows
$what = 'row_delete';
$selected = $_REQUEST['rows_to_delete'];
}
-} // end if
+}
if (empty($db)) {
$db = '';
diff --git a/libraries/tbl_columns_definition_form.inc.php b/libraries/tbl_columns_definition_form.inc.php
index 9dc5b8abec..59e257aa04 100644
--- a/libraries/tbl_columns_definition_form.inc.php
+++ b/libraries/tbl_columns_definition_form.inc.php
@@ -64,7 +64,8 @@ if ($action == 'tbl_create.php') {
$form_params = array_merge(
$form_params,
[
- 'field_where' => Util::getValueByKey($_POST, 'field_where')]
+ 'field_where' => Util::getValueByKey($_POST, 'field_where')
+ ]
);
if (isset($_POST['field_where'])) {
$form_params['after_field'] = $_POST['after_field'];
diff --git a/setup/frames/index.inc.php b/setup/frames/index.inc.php
index 68dc861334..5e86d7f668 100644
--- a/setup/frames/index.inc.php
+++ b/setup/frames/index.inc.php
@@ -208,7 +208,8 @@ echo '';
$opts = [
'doc' => $form_display->getDocLink('DefaultLang'),
'values' => [],
- 'values_escaped' => true];
+ 'values_escaped' => true
+];
foreach ($all_languages as $each_lang) {
$opts['values'][$each_lang->getCode()] = $each_lang->getName();
}
@@ -226,7 +227,8 @@ echo $formDisplayTemplate->displayInput(
$opts = [
'doc' => $form_display->getDocLink('ServerDefault'),
'values' => [],
- 'values_disabled' => []];
+ 'values_disabled' => []
+];
if ($cf->getServerCount() > 0) {
$opts['values']['0'] = __('let the user choose');
$opts['values']['-'] = '------------------------------';
@@ -256,8 +258,10 @@ echo $formDisplayTemplate->displayInput(
$opts = [
'values' => [
'unix' => 'UNIX / Linux (\n)',
- 'win' => 'Windows (\r\n)'],
- 'values_escaped' => true];
+ 'win' => 'Windows (\r\n)'
+ ],
+ 'values_escaped' => true
+];
$eol = Core::ifSetOr($_SESSION['eol'], (PMA_IS_WINDOWS ? 'win' : 'unix'));
echo $formDisplayTemplate->displayInput(
'eol',
diff --git a/setup/frames/servers.inc.php b/setup/frames/servers.inc.php
index 5006a98350..47ed4a65ac 100644
--- a/setup/frames/servers.inc.php
+++ b/setup/frames/servers.inc.php
@@ -32,9 +32,7 @@ if ($mode == 'edit' && $server_exists) {
$cf->removeServer($id);
header('Location: index.php' . Url::getCommonRaw());
exit;
-} elseif ($mode == 'revert' && $server_exists) {
- // handled by process_formset()
-} else {
+} elseif (! ($mode == 'revert' && $server_exists)) {
$page_title = __('Add a new server');
$id = 0;
}
diff --git a/setup/lib/Index.php b/setup/lib/Index.php
index 44a802c026..b8618c1b3a 100644
--- a/setup/lib/Index.php
+++ b/setup/lib/Index.php
@@ -58,7 +58,8 @@ class Index
'fresh' => $fresh,
'active' => true,
'title' => $title,
- 'message' => $message];
+ 'message' => $message
+ ];
}
/**
diff --git a/test/classes/AdvisorTest.php b/test/classes/AdvisorTest.php
index 377d0dec37..fe24f8e82d 100644
--- a/test/classes/AdvisorTest.php
+++ b/test/classes/AdvisorTest.php
@@ -61,7 +61,7 @@ class AdvisorTest extends PmaTestCase
['%s%', '%s%%'],
['80% foo', '80%% foo'],
['%s% foo', '%s%% foo'],
- ];
+ ];
}
/**
diff --git a/test/classes/CentralColumnsTest.php b/test/classes/CentralColumnsTest.php
index 402a2461f6..975b1c6ed7 100644
--- a/test/classes/CentralColumnsTest.php
+++ b/test/classes/CentralColumnsTest.php
@@ -474,8 +474,8 @@ class CentralColumnsTest extends TestCase
$result
);
$header_cells = [
- __('Name'), __('Type'), __('Length/Values'), __('Default'),
- __('Collation'), __('Attributes'), __('Null'), __('A_I')
+ __('Name'), __('Type'), __('Length/Values'), __('Default'),
+ __('Collation'), __('Attributes'), __('Null'), __('A_I')
];
$this->assertContains(
$this->callProtectedMethod(
diff --git a/test/classes/Config/ConfigFileTest.php b/test/classes/Config/ConfigFileTest.php
index d09c08a163..64704d0339 100644
--- a/test/classes/Config/ConfigFileTest.php
+++ b/test/classes/Config/ConfigFileTest.php
@@ -97,7 +97,8 @@ class ConfigFileTest extends PmaTestCase
$default_config = [
self::SIMPLE_KEY_WITH_DEFAULT_VALUE => $default_simple_value,
'Servers/1/host' => $default_host,
- 'Servers/2/host' => $default_host];
+ 'Servers/2/host' => $default_host
+ ];
/**
* Case 1: set default value, key should not be persisted
@@ -185,11 +186,15 @@ class ConfigFileTest extends PmaTestCase
$this->object->updateWithGlobalConfig(['Servers/value1' => 3]);
$this->assertEquals(
- ['Servers' => [
- 1 => [
- 'passthrough1' => 1,
- 'passthrough2' => 2,
- 'value1' => 3]]],
+ [
+ 'Servers' => [
+ 1 => [
+ 'passthrough1' => 1,
+ 'passthrough2' => 2,
+ 'value1' => 3
+ ]
+ ]
+ ],
$this->object->getConfig()
);
$this->assertEquals(
diff --git a/test/classes/ConfigTest.php b/test/classes/ConfigTest.php
index 6244b4bb2d..b5f4b807df 100644
--- a/test/classes/ConfigTest.php
+++ b/test/classes/ConfigTest.php
@@ -552,7 +552,7 @@ class ConfigTest extends PmaTestCase
'PMA_USR_OS',
'PMA_USR_BROWSER_VER',
'PMA_USR_BROWSER_AGENT'
- ];
+ ];
foreach ($defines as $define) {
$this->assertTrue(defined($define));
diff --git a/test/classes/Controllers/Server/ServerBinlogControllerTest.php b/test/classes/Controllers/Server/ServerBinlogControllerTest.php
index 1ce2652ec2..807bde4680 100644
--- a/test/classes/Controllers/Server/ServerBinlogControllerTest.php
+++ b/test/classes/Controllers/Server/ServerBinlogControllerTest.php
@@ -149,12 +149,12 @@ class ServerBinlogControllerTest extends PmaTestCase
]
];
$value = [
- 'Info' => "index1_Info",
- 'Log_name' => "index1_Log_name",
- 'Pos' => "index1_Pos",
- 'Event_type' => "index1_Event_type",
- 'End_log_pos' => "index1_End_log_pos",
- 'Server_id' => "index1_Server_id",
+ 'Info' => "index1_Info",
+ 'Log_name' => "index1_Log_name",
+ 'Pos' => "index1_Pos",
+ 'Event_type' => "index1_Event_type",
+ 'End_log_pos' => "index1_End_log_pos",
+ 'Server_id' => "index1_Server_id",
];
$count = 3;
diff --git a/test/classes/CoreTest.php b/test/classes/CoreTest.php
index 891d9199df..c3a374e4f9 100644
--- a/test/classes/CoreTest.php
+++ b/test/classes/CoreTest.php
@@ -483,9 +483,11 @@ class CoreTest extends PmaTestCase
{
return [
['https://wiki.phpmyadmin.net',
- './url.php?url=https%3A%2F%2Fwiki.phpmyadmin.net'],
+ './url.php?url=https%3A%2F%2Fwiki.phpmyadmin.net'
+ ],
['https://wiki.phpmyadmin.net',
- './url.php?url=https%3A%2F%2Fwiki.phpmyadmin.net'],
+ './url.php?url=https%3A%2F%2Fwiki.phpmyadmin.net'
+ ],
['wiki.phpmyadmin.net', 'wiki.phpmyadmin.net'],
['index.php?db=phpmyadmin', 'index.php?db=phpmyadmin']
];
@@ -703,7 +705,8 @@ class CoreTest extends PmaTestCase
[[], false, null],
[[1, 2, 3], false, null],
[true, false, null],
- [false, false, null]];
+ [false, false, null]
+ ];
}
/**
diff --git a/test/classes/CreateAddFieldTest.php b/test/classes/CreateAddFieldTest.php
index 9406a67d34..a894f24d9c 100644
--- a/test/classes/CreateAddFieldTest.php
+++ b/test/classes/CreateAddFieldTest.php
@@ -60,11 +60,14 @@ class CreateAddFieldTest extends TestCase
{
return [
['', []],
- [' PARTITION BY HASH (EXPR()) PARTITIONS 2', [
- 'partition_by' => 'HASH',
- 'partition_expr' => 'EXPR()',
- 'partition_count' => '2',
- ]],
+ [
+ ' PARTITION BY HASH (EXPR()) PARTITIONS 2',
+ [
+ 'partition_by' => 'HASH',
+ 'partition_expr' => 'EXPR()',
+ 'partition_count' => '2',
+ ]
+ ],
];
}
@@ -95,14 +98,17 @@ class CreateAddFieldTest extends TestCase
public function providerGetTableCreationQuery()
{
return [
- ['CREATE TABLE `db`.`table` ();', 'db', 'table', [
- 'field_name' => [],
- 'primary_indexes' => '{}',
- 'indexes' => '{}',
- 'unique_indexes' => '{}',
- 'fulltext_indexes' => '{}',
- 'spatial_indexes' => '{}',
- ]],
+ [
+ 'CREATE TABLE `db`.`table` ();', 'db', 'table',
+ [
+ 'field_name' => [],
+ 'primary_indexes' => '{}',
+ 'indexes' => '{}',
+ 'unique_indexes' => '{}',
+ 'fulltext_indexes' => '{}',
+ 'spatial_indexes' => '{}',
+ ]
+ ],
];
}
diff --git a/test/classes/Database/SearchTest.php b/test/classes/Database/SearchTest.php
index 3397eab612..95feace23d 100644
--- a/test/classes/Database/SearchTest.php
+++ b/test/classes/Database/SearchTest.php
@@ -155,7 +155,7 @@ class SearchTest extends PmaTestCase
'select_count' => 'SELECT COUNT(*) AS `count` FROM `pma`.`table1` ' .
'WHERE FALSE',
'delete' => 'DELETE FROM `pma`.`table1` WHERE FALSE'
- ],
+ ],
$this->callProtectedFunction(
'getSearchSqls',
['table1']
diff --git a/test/classes/Engines/InnodbTest.php b/test/classes/Engines/InnodbTest.php
index 5f74d32a96..9f0f42348f 100644
--- a/test/classes/Engines/InnodbTest.php
+++ b/test/classes/Engines/InnodbTest.php
@@ -182,7 +182,7 @@ class InnodbTest extends PmaTestCase
[
'Bufferpool' => 'Buffer Pool',
'Status' => 'InnoDB Status'
- ],
+ ],
$this->object->getInfoPages()
);
}
diff --git a/test/classes/Engines/MemoryTest.php b/test/classes/Engines/MemoryTest.php
index d0fc5f6dff..c1a1e45ef7 100644
--- a/test/classes/Engines/MemoryTest.php
+++ b/test/classes/Engines/MemoryTest.php
@@ -59,9 +59,9 @@ class MemoryTest extends PmaTestCase
$this->object->getVariables(),
[
'max_heap_table_size' => [
- 'type' => 1,
- ]
+ 'type' => 1,
]
+ ]
);
}
}
diff --git a/test/classes/Engines/PbxtTest.php b/test/classes/Engines/PbxtTest.php
index 945a8e7115..212601bbd1 100644
--- a/test/classes/Engines/PbxtTest.php
+++ b/test/classes/Engines/PbxtTest.php
@@ -197,24 +197,24 @@ class PbxtTest extends PmaTestCase
return [
[
'8MB',
- [
+ [
0 => '8,192',
1 => 'KiB'
- ]
+ ]
],
[
'10mb',
- [
+ [
0 => '-1',
1 => 'B'
- ]
+ ]
],
[
'A4',
- [
+ [
0 => '0',
1 => 'B'
- ]
+ ]
]
];
}
diff --git a/test/classes/IndexTest.php b/test/classes/IndexTest.php
index a961599490..d726a79520 100644
--- a/test/classes/IndexTest.php
+++ b/test/classes/IndexTest.php
@@ -38,18 +38,27 @@ class IndexTest extends PmaTestCase
$this->_params['Packed'] = "PMA_Packed";
//test add columns
- $column1 = ["Column_name" => "column1","Seq_in_index" => "index1",
- "Collation" => "Collation1","Cardinality" => "Cardinality1",
- "Null" => "null1"
- ];
- $column2 = ["Column_name" => "column2","Seq_in_index" => "index2",
- "Collation" => "Collation2","Cardinality" => "Cardinality2",
- "Null" => "null2"
- ];
- $column3 = ["Column_name" => "column3","Seq_in_index" => "index3",
- "Collation" => "Collation3","Cardinality" => "Cardinality3",
- "Null" => "null3"
- ];
+ $column1 = [
+ "Column_name" => "column1",
+ "Seq_in_index" => "index1",
+ "Collation" => "Collation1",
+ "Cardinality" => "Cardinality1",
+ "Null" => "null1"
+ ];
+ $column2 = [
+ "Column_name" => "column2",
+ "Seq_in_index" => "index2",
+ "Collation" => "Collation2",
+ "Cardinality" => "Cardinality2",
+ "Null" => "null2"
+ ];
+ $column3 = [
+ "Column_name" => "column3",
+ "Seq_in_index" => "index3",
+ "Collation" => "Collation3",
+ "Cardinality" => "Cardinality3",
+ "Null" => "null3"
+ ];
$this->_params['columns'][] = $column1;
$this->_params['columns'][] = $column2;
$this->_params['columns'][] = $column3;
diff --git a/test/classes/NormalizationTest.php b/test/classes/NormalizationTest.php
index 5df55d1682..e69c6c2942 100644
--- a/test/classes/NormalizationTest.php
+++ b/test/classes/NormalizationTest.php
@@ -72,18 +72,21 @@ class NormalizationTest extends TestCase
->method('getColumnNames')
->will($this->returnValue(["id", "col1", "col2"]));
$map = [
- ['PMA_db', 'PMA_table1', DatabaseInterface::CONNECT_USER, []],
- [
- 'PMA_db', 'PMA_table', DatabaseInterface::CONNECT_USER,
- [['Key_name' => 'PRIMARY', 'Column_name' => 'id']]
- ],
- [
- 'PMA_db', 'PMA_table2', DatabaseInterface::CONNECT_USER,
- [
- ['Key_name' => 'PRIMARY', 'Column_name' => 'id'],
- ['Key_name' => 'PRIMARY', 'Column_name' => 'col1']
- ]
- ],
+ [
+ 'PMA_db', 'PMA_table1', DatabaseInterface::CONNECT_USER,
+ []
+ ],
+ [
+ 'PMA_db', 'PMA_table', DatabaseInterface::CONNECT_USER,
+ [['Key_name' => 'PRIMARY', 'Column_name' => 'id']]
+ ],
+ [
+ 'PMA_db', 'PMA_table2', DatabaseInterface::CONNECT_USER,
+ [
+ ['Key_name' => 'PRIMARY', 'Column_name' => 'id'],
+ ['Key_name' => 'PRIMARY', 'Column_name' => 'col1']
+ ]
+ ],
];
$dbi->expects($this->any())
->method('getTableIndexes')
@@ -366,7 +369,7 @@ class NormalizationTest extends TestCase
'html' => '',
'success' => true,
'newTables' => []
- ],
+ ],
$result
);
$tables = ["PMA_table" => ['col1', 'PMA_table']];
@@ -508,7 +511,8 @@ class NormalizationTest extends TestCase
$choices = [
'1nf' => __('First step of normalization (1NF)'),
'2nf' => __('Second step of normalization (1NF+2NF)'),
- '3nf' => __('Third step of normalization (1NF+2NF+3NF)')];
+ '3nf' => __('Third step of normalization (1NF+2NF+3NF)')
+ ];
$htmlTmp = Util::getRadioFields(
'normalizeTo',
diff --git a/test/classes/Plugins/Auth/AuthenticationHttpTest.php b/test/classes/Plugins/Auth/AuthenticationHttpTest.php
index 185253aa08..be860ae175 100644
--- a/test/classes/Plugins/Auth/AuthenticationHttpTest.php
+++ b/test/classes/Plugins/Auth/AuthenticationHttpTest.php
@@ -58,10 +58,10 @@ class AuthenticationHttpTest extends PmaTestCase
}
/**
- * @param mixed $set_minimal set minimal
- * @param mixed $body_id body id
- * @param mixed $set_title set title
- * @param mixed[] ... $headers headers
+ * @param mixed $set_minimal set minimal
+ * @param mixed $body_id body id
+ * @param mixed $set_title set title
+ * @param mixed[] ... $headers headers
*
* @return void
*/
diff --git a/test/classes/RelationTest.php b/test/classes/RelationTest.php
index 02e39dec0f..742bf38cf8 100644
--- a/test/classes/RelationTest.php
+++ b/test/classes/RelationTest.php
@@ -218,16 +218,16 @@ class RelationTest extends TestCase
->getMock();
$getColumnsResult = [
- [
- 'Field' => 'field1',
- 'Type' => 'int(11)',
- 'Comment' => 'Comment1'
- ],
- [
- 'Field' => 'field2',
- 'Type' => 'text',
- 'Comment' => 'Comment1'
- ]
+ [
+ 'Field' => 'field1',
+ 'Type' => 'int(11)',
+ 'Comment' => 'Comment1'
+ ],
+ [
+ 'Field' => 'field2',
+ 'Type' => 'text',
+ 'Comment' => 'Comment1'
+ ]
];
$dbi->expects($this->any())->method('getColumns')
->will($this->returnValue($getColumnsResult));
@@ -301,10 +301,10 @@ class RelationTest extends TestCase
{
$foreigners = [
'value' => [
- 'master_field' => 'value',
- 'foreign_db' => 'GSoC14',
- 'foreign_table' => 'test',
- 'foreign_field' => 'value'
+ 'master_field' => 'value',
+ 'foreign_db' => 'GSoC14',
+ 'foreign_table' => 'test',
+ 'foreign_field' => 'value'
],
'foreign_keys_data' => [
0 => [
diff --git a/test/classes/SanitizeTest.php b/test/classes/SanitizeTest.php
index 622cd3cd80..96676745d2 100644
--- a/test/classes/SanitizeTest.php
+++ b/test/classes/SanitizeTest.php
@@ -256,8 +256,8 @@ class SanitizeTest extends TestCase
['\r\n\\\'"],
['\\\';[XSS]', '\';[XSS]'],
[
- '\' + \'script>[HTML]',
- '[HTML]'
+ '\' + \'script>[HTML]',
+ '[HTML]'
],
['\"\\\'\\\\\\\'\"', '"\'\\\'"'],
["\\\\\'\'\'\'\'\'\'\'\'\'\'\'\\\\", "\\''''''''''''\\"]
diff --git a/test/classes/Setup/FormProcessingTest.php b/test/classes/Setup/FormProcessingTest.php
index 6fd93dc8e3..57b7dc1dcc 100644
--- a/test/classes/Setup/FormProcessingTest.php
+++ b/test/classes/Setup/FormProcessingTest.php
@@ -45,7 +45,7 @@ class FormProcessingTest extends PmaTestCase
['status: 303 See Other'],
['Location: index.php?lang=en'],
303
- ]
+ ]
);
// case 1
diff --git a/test/classes/TrackerTest.php b/test/classes/TrackerTest.php
index 500ff9ca8c..4bd0a3f236 100644
--- a/test/classes/TrackerTest.php
+++ b/test/classes/TrackerTest.php
@@ -628,17 +628,17 @@ class TrackerTest extends PmaTestCase
'date_from' => '20-03-2013 23:33:58',
'date_to' => '20-03-2013 23:39:58',
'ddlog' => [
- [
- 'date' => '20-03-2013 23:33:58',
- 'username' => 'user1',
- 'statement' => "\nstat1"
- ],
- [
- 'date' => '20-03-2013 23:39:58',
- 'username' => 'user2',
- 'statement' => ""
- ]
- ],
+ [
+ 'date' => '20-03-2013 23:33:58',
+ 'username' => 'user1',
+ 'statement' => "\nstat1"
+ ],
+ [
+ 'date' => '20-03-2013 23:39:58',
+ 'username' => 'user2',
+ 'statement' => ""
+ ]
+ ],
'dmlog' => [],
"schema_snapshot" => "dataschema",
"tracking" => "SELECT, DELETE"
@@ -658,29 +658,29 @@ class TrackerTest extends PmaTestCase
'date_from' => '20-03-2012 23:33:58',
'date_to' => '20-03-2013 23:39:58',
'ddlog' => [
- [
- 'date' => '20-03-2012 23:33:58',
- 'username' => 'user1',
- 'statement' => ""
- ],
- [
- 'date' => '20-03-2012 23:39:58',
- 'username' => 'user2',
- 'statement' => ""
- ]
- ],
+ [
+ 'date' => '20-03-2012 23:33:58',
+ 'username' => 'user1',
+ 'statement' => ""
+ ],
+ [
+ 'date' => '20-03-2012 23:39:58',
+ 'username' => 'user2',
+ 'statement' => ""
+ ]
+ ],
'dmlog' => [
- [
- 'date' => '20-03-2013 23:33:58',
- 'username' => 'user3',
- 'statement' => ""
- ],
- [
- 'date' => '20-03-2013 23:39:58',
- 'username' => 'user4',
- 'statement' => ""
- ]
- ],
+ [
+ 'date' => '20-03-2013 23:33:58',
+ 'username' => 'user3',
+ 'statement' => ""
+ ],
+ [
+ 'date' => '20-03-2013 23:39:58',
+ 'username' => 'user4',
+ 'statement' => ""
+ ]
+ ],
"schema_snapshot" => "dataschema",
"tracking" => "SELECT, DELETE"
];
diff --git a/test/classes/TransformationsTest.php b/test/classes/TransformationsTest.php
index 438a533e44..98d542e038 100644
--- a/test/classes/TransformationsTest.php
+++ b/test/classes/TransformationsTest.php
@@ -123,7 +123,7 @@ class TransformationsTest extends TestCase
16 => 'Text/Plain: Longtoipv4',
17 => 'Text/Plain: PreApPend',
18 => 'Text/Plain: Substring',
- ],
+ ],
'transformation_file' => [
0 => 'Output/Application_Octetstream_Download.php',
1 => 'Output/Application_Octetstream_Hex.php',
@@ -171,7 +171,7 @@ class TransformationsTest extends TestCase
'Text_Plain_PreApPend.php',
'Text_Plain_Substring.php',
],
- ],
+ ],
$this->transformations->getAvailableMimeTypes()
);
}
diff --git a/test/classes/TwoFactorTest.php b/test/classes/TwoFactorTest.php
index f0627af848..09e4217f34 100644
--- a/test/classes/TwoFactorTest.php
+++ b/test/classes/TwoFactorTest.php
@@ -263,7 +263,8 @@ class TwoFactorTest extends PmaTestCase
'challenge' => 'fEnc9oV79EaBgK5BoNERU5gPKM2XGYWrz4fUjgc0Q7g',
'keyHandle' => 'CTUayZo8hCBeC-sGQJChC0wW-bBg99bmOlGCgw8XGq4dLsxO3yWh9mRYArZxocP5hBB1pEGB3bbJYiM-5acc5w',
'appId' => 'http://demo.example.com'
- ])];
+ ])
+ ];
$this->assertFalse($object->check(true));
$_POST['u2f_authentication_response'] = '{ "signatureData": "AQAAAAQwRQIhAI6FSrMD3KUUtkpiP0jpIEakql-HNhwWFngyw553pS1CAiAKLjACPOhxzZXuZsVO8im-HStEcYGC50PKhsGp_SUAng==", "clientData": "eyAiY2hhbGxlbmdlIjogImZFbmM5b1Y3OUVhQmdLNUJvTkVSVTVnUEtNMlhHWVdyejRmVWpnYzBRN2ciLCAib3JpZ2luIjogImh0dHA6XC9cL2RlbW8uZXhhbXBsZS5jb20iLCAidHlwIjogIm5hdmlnYXRvci5pZC5nZXRBc3NlcnRpb24iIH0=", "keyHandle": "CTUayZo8hCBeC-sGQJChC0wW-bBg99bmOlGCgw8XGq4dLsxO3yWh9mRYArZxocP5hBB1pEGB3bbJYiM-5acc5w", "errorCode": 0 }';
$this->assertTrue($object->check(true));
diff --git a/test/classes/TypesTest.php b/test/classes/TypesTest.php
index 25eff39401..8721cecc21 100644
--- a/test/classes/TypesTest.php
+++ b/test/classes/TypesTest.php
@@ -711,7 +711,7 @@ class TypesTest extends PmaTestCase
'TINYINT',
'SMALLINT',
'MEDIUMINT',
- 'INT',
+ 'INT',
'BIGINT',
'-',
'DECIMAL',
@@ -732,10 +732,10 @@ class TypesTest extends PmaTestCase
],
'String' => [
'CHAR',
- 'VARCHAR',
+ 'VARCHAR',
'-',
'TINYTEXT',
- 'TEXT',
+ 'TEXT',
'MEDIUMTEXT',
'LONGTEXT',
'-',