Skip to content

Commit

Permalink
Fix function call signatures indentation
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed May 26, 2020
1 parent 3ae05c7 commit 94955f1
Show file tree
Hide file tree
Showing 13 changed files with 213 additions and 212 deletions.
24 changes: 12 additions & 12 deletions libraries/classes/Controllers/Database/StructureController.php
Expand Up @@ -895,10 +895,10 @@ protected function displayTableList(): string
$table_is_view,
$sum_size,
] = $this->getStuffForEngineTypeTable(
$current_table,
$sum_size,
$overhead_size
);
$current_table,
$sum_size,
$overhead_size
);

$curTable = $this->dbi
->getTable($this->db, $current_table['TABLE_NAME']);
Expand Down Expand Up @@ -1428,14 +1428,14 @@ protected function getStuffForEngineTypeTable(
$overhead_size,
$sum_size,
] = $this->getValuesForAriaTable(
$current_table,
$sum_size,
$overhead_size,
$formatted_size,
$unit,
$formatted_overhead,
$overhead_unit
);
$current_table,
$sum_size,
$overhead_size,
$formatted_size,
$unit,
$formatted_overhead,
$overhead_unit
);
break;
case 'InnoDB':
case 'PBMS':
Expand Down
16 changes: 8 additions & 8 deletions libraries/classes/Controllers/ErrorReportController.php
Expand Up @@ -112,14 +112,14 @@ public function index(): void
}
} else {
$msg = __(
'An error has been detected and an error report has been '
. 'generated but failed to be sent.'
)
. ' '
. __(
'If you experience any '
. 'problems please submit a bug report manually.'
);
'An error has been detected and an error report has been '
. 'generated but failed to be sent.'
);
$msg .= ' ';
$msg .= __(
'If you experience any '
. 'problems please submit a bug report manually.'
);
}
$msg .= ' ' . __('You may want to refresh the page.');

Expand Down
6 changes: 3 additions & 3 deletions libraries/classes/Controllers/ImportController.php
Expand Up @@ -627,9 +627,9 @@ public function index(): void
$message = Message::notice(__('Showing bookmark'));
} elseif ($bookmark_created) {
$special_message = '[br]' . sprintf(
__('Bookmark %s has been created.'),
htmlspecialchars($_POST['bkm_label'])
);
__('Bookmark %s has been created.'),
htmlspecialchars($_POST['bkm_label'])
);
} elseif ($finished && ! $error) {
// Do not display the query with message, we do it separately
$display_query = ';';
Expand Down
9 changes: 7 additions & 2 deletions libraries/classes/Controllers/Server/PrivilegesController.php
Expand Up @@ -251,8 +251,13 @@ public function index(): void
* Adds a user
* (Changes / copies a user, part II)
*/
[$ret_message, $ret_queries, $queries_for_display, $sql_query, $_add_user_error]
= $serverPrivileges->addUser(
[
$ret_message,
$ret_queries,
$queries_for_display,
$sql_query,
$_add_user_error,
] = $serverPrivileges->addUser(
$dbname ?? null,
$username ?? null,
$hostname ?? null,
Expand Down
3 changes: 1 addition & 2 deletions libraries/classes/Controllers/Table/ReplaceController.php
Expand Up @@ -509,8 +509,7 @@ public function index(): void
$relation_field
);

$extra_data['relations'][$cell_index]
= $this->insertEdit->getLinkForRelationalDisplayField(
$extra_data['relations'][$cell_index] = $this->insertEdit->getLinkForRelationalDisplayField(
$map,
$relation_field,
$where_comparison,
Expand Down
56 changes: 28 additions & 28 deletions libraries/classes/Display/Results.php
Expand Up @@ -1959,39 +1959,39 @@ private function _getSortingUrlParams(array $sort_direction, $sort_order, $index
if (strtoupper(trim($sort_direction[$index])) == self::DESCENDING_SORT_DIR) {
$sort_order .= ' ASC';
$order_img = ' ' . Generator::getImage(
's_desc',
__('Descending'),
[
'class' => 'soimg',
'title' => '',
]
);
's_desc',
__('Descending'),
[
'class' => 'soimg',
'title' => '',
]
);
$order_img .= ' ' . Generator::getImage(
's_asc',
__('Ascending'),
[
'class' => 'soimg hide',
'title' => '',
]
);
's_asc',
__('Ascending'),
[
'class' => 'soimg hide',
'title' => '',
]
);
} else {
$sort_order .= ' DESC';
$order_img = ' ' . Generator::getImage(
's_asc',
__('Ascending'),
[
'class' => 'soimg',
'title' => '',
]
);
's_asc',
__('Ascending'),
[
'class' => 'soimg',
'title' => '',
]
);
$order_img .= ' ' . Generator::getImage(
's_desc',
__('Descending'),
[
'class' => 'soimg hide',
'title' => '',
]
);
's_desc',
__('Descending'),
[
'class' => 'soimg hide',
'title' => '',
]
);
}

return [
Expand Down
8 changes: 4 additions & 4 deletions libraries/classes/Engines/Innodb.php
Expand Up @@ -355,9 +355,9 @@ public function getInnodbFileFormat()
public function supportsFilePerTable()
{
return $GLOBALS['dbi']->fetchValue(
"SHOW GLOBAL VARIABLES LIKE 'innodb_file_per_table';",
0,
1
) == 'ON';
"SHOW GLOBAL VARIABLES LIKE 'innodb_file_per_table';",
0,
1
) == 'ON';
}
}
32 changes: 16 additions & 16 deletions libraries/classes/Html/Generator.php
Expand Up @@ -332,9 +332,9 @@ public static function getServerSSL(): string
}

return '<span class="' . $class . '">' . $message . '</span> ' . MySQLDocumentation::showDocumentation(
'setup',
'ssl'
);
'setup',
'ssl'
);
}

/**
Expand Down Expand Up @@ -679,10 +679,10 @@ public static function getMessage(
// data), the parser chokes; so avoid parsing the query
$query_too_big = true;
$query_base = mb_substr(
$sql_query,
0,
$cfg['MaxCharactersInDisplayedSQL']
) . '[...]';
$sql_query,
0,
$cfg['MaxCharactersInDisplayedSQL']
) . '[...]';
} else {
$query_base = $sql_query;
}
Expand Down Expand Up @@ -999,9 +999,9 @@ public static function mysqlDie(
$error_msg .= '<p><strong>' . __('Static analysis:')
. '</strong></p>';
$error_msg .= '<p>' . sprintf(
__('%d errors were found during analysis.'),
count($errors)
) . '</p>';
__('%d errors were found during analysis.'),
count($errors)
) . '</p>';
$error_msg .= '<p><ol>';
$error_msg .= implode(
ParserError::format(
Expand All @@ -1014,8 +1014,8 @@ public static function mysqlDie(

// Display the SQL query and link to MySQL documentation.
$error_msg .= '<p><strong>' . __('SQL query:') . '</strong>' . self::showCopyToClipboard(
$sql_query
) . "\n";
$sql_query
) . "\n";
$formattedSqlToLower = mb_strtolower($formatted_sql);

// TODO: Show documentation for all statement types.
Expand Down Expand Up @@ -1398,10 +1398,10 @@ public static function formatSql($sqlQuery, $truncate = false): string
&& mb_strlen($sqlQuery) > $cfg['MaxCharactersInDisplayedSQL']
) {
$sqlQuery = mb_substr(
$sqlQuery,
0,
$cfg['MaxCharactersInDisplayedSQL']
) . '[...]';
$sqlQuery,
0,
$cfg['MaxCharactersInDisplayedSQL']
) . '[...]';
}

return '<code class="sql"><pre>' . "\n"
Expand Down
4 changes: 2 additions & 2 deletions libraries/classes/Table.php
Expand Up @@ -2598,8 +2598,8 @@ public function updateForeignKeys(
);
}
$html_output .= MySQLDocumentation::show(
'InnoDB_foreign_key_constraints'
) . "\n";
'InnoDB_foreign_key_constraints'
) . "\n";
}
} else {
$preview_sql_data .= $create_query . "\n";
Expand Down
56 changes: 28 additions & 28 deletions libraries/classes/Util.php
Expand Up @@ -3052,21 +3052,21 @@ public static function sortableTableHeader($title, $sort, $initialSortOrder = 'A
$futureSortOrder = 'DESC';
// current sort order is ASC
$orderImg = ' ' . Generator::getImage(
's_asc',
__('Ascending'),
[
'class' => 'sort_arrow',
'title' => '',
]
);
's_asc',
__('Ascending'),
[
'class' => 'sort_arrow',
'title' => '',
]
);
$orderImg .= ' ' . Generator::getImage(
's_desc',
__('Descending'),
[
'class' => 'sort_arrow hide',
'title' => '',
]
);
's_desc',
__('Descending'),
[
'class' => 'sort_arrow hide',
'title' => '',
]
);
// but on mouse over, show the reverse order (DESC)
$orderLinkParams['onmouseover'] = "$('.sort_arrow').toggle();";
// on mouse out, show current sort order (ASC)
Expand All @@ -3075,21 +3075,21 @@ public static function sortableTableHeader($title, $sort, $initialSortOrder = 'A
$futureSortOrder = 'ASC';
// current sort order is DESC
$orderImg = ' ' . Generator::getImage(
's_asc',
__('Ascending'),
[
'class' => 'sort_arrow hide',
'title' => '',
]
);
's_asc',
__('Ascending'),
[
'class' => 'sort_arrow hide',
'title' => '',
]
);
$orderImg .= ' ' . Generator::getImage(
's_desc',
__('Descending'),
[
'class' => 'sort_arrow',
'title' => '',
]
);
's_desc',
__('Descending'),
[
'class' => 'sort_arrow',
'title' => '',
]
);
// but on mouse over, show the reverse order (ASC)
$orderLinkParams['onmouseover'] = "$('.sort_arrow').toggle();";
// on mouse out, show current sort order (DESC)
Expand Down
3 changes: 0 additions & 3 deletions phpcs.xml.dist
Expand Up @@ -25,9 +25,6 @@
<rule ref="Squiz.NamingConventions.ValidVariableName">
<severity>4</severity>
</rule>
<rule ref="PSR2.Methods.FunctionCallSignature.Indent">
<severity>0</severity>
</rule>

<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>

Expand Down

0 comments on commit 94955f1

Please sign in to comment.