Skip to content

Commit 8a5ce0b

Browse files
committed
Split long lines
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
1 parent bd1850c commit 8a5ce0b

12 files changed

Lines changed: 78 additions & 25 deletions

File tree

libraries/classes/Database/Designer/Common.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,17 @@ public function saveDisplayField(string $db, string $table, string $field): arra
534534
* @return array<int,string|bool> array of success/failure and message
535535
* @psalm-return array{0: bool, 1: string}
536536
*/
537-
public function addNewRelation(string $db, string $T1, string $F1, string $T2, string $F2, string $on_delete, string $on_update, string $DB1, string $DB2): array
538-
{
537+
public function addNewRelation(
538+
string $db,
539+
string $T1,
540+
string $F1,
541+
string $T2,
542+
string $F2,
543+
string $on_delete,
544+
string $on_update,
545+
string $DB1,
546+
string $DB2,
547+
): array {
539548
$tables = $this->dbi->getTablesFull($DB1, $T1);
540549
$type_T1 = mb_strtoupper($tables[$T1]['ENGINE'] ?? '');
541550
$tables = $this->dbi->getTablesFull($DB2, $T2);

libraries/classes/Database/Events.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,11 @@ class Events
6262
'MINUTE_SECOND',
6363
];
6464

65-
public function __construct(private DatabaseInterface $dbi, private Template $template, private ResponseRenderer $response)
66-
{
65+
public function __construct(
66+
private DatabaseInterface $dbi,
67+
private Template $template,
68+
private ResponseRenderer $response,
69+
) {
6770
}
6871

6972
/**

libraries/classes/Database/Routines.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ class Routines
5757
/** @var array<int, string> */
5858
private array $numericOptions = ['UNSIGNED', 'ZEROFILL', 'UNSIGNED ZEROFILL'];
5959

60-
public function __construct(private DatabaseInterface $dbi, private Template $template, private ResponseRenderer $response)
61-
{
60+
public function __construct(
61+
private DatabaseInterface $dbi,
62+
private Template $template,
63+
private ResponseRenderer $response,
64+
) {
6265
}
6366

6467
/**

libraries/classes/Database/Triggers.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ class Triggers
3737
/** @var array<int, string> */
3838
private array $event = ['INSERT', 'UPDATE', 'DELETE'];
3939

40-
public function __construct(private DatabaseInterface $dbi, private Template $template, private ResponseRenderer $response)
41-
{
40+
public function __construct(
41+
private DatabaseInterface $dbi,
42+
private Template $template,
43+
private ResponseRenderer $response,
44+
) {
4245
}
4346

4447
/**

libraries/classes/Display/Results.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,14 @@ class Results
245245
* @param string $goto the URL to go back in case of errors
246246
* @param string $sqlQuery the SQL query
247247
*/
248-
public function __construct(private DatabaseInterface $dbi, string $db, string $table, int $server, string $goto, string $sqlQuery)
249-
{
248+
public function __construct(
249+
private DatabaseInterface $dbi,
250+
string $db,
251+
string $table,
252+
int $server,
253+
string $goto,
254+
string $sqlQuery,
255+
) {
250256
$this->relation = new Relation($this->dbi);
251257
$this->transformations = new Transformations();
252258
$this->template = new Template();

libraries/classes/Html/MySQLDocumentation.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,12 @@ public static function show(
6666
*
6767
* @return string the html link
6868
*/
69-
public static function showDocumentation(string $page, string $anchor = '', bool $bbcode = false, bool $disableTabIndex = false): string
70-
{
69+
public static function showDocumentation(
70+
string $page,
71+
string $anchor = '',
72+
bool $bbcode = false,
73+
bool $disableTabIndex = false,
74+
): string {
7175
return Generator::showDocumentationLink(
7276
self::getDocumentationLink($page, $anchor),
7377
'documentation',

libraries/classes/Language.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ class Language
3333
* @param string $regex Match regular expression
3434
* @param string $mysql MySQL locale code
3535
*/
36-
public function __construct(protected string $code, protected string $name, protected string $native, string $regex, protected string $mysql)
37-
{
36+
public function __construct(
37+
protected string $code,
38+
protected string $name,
39+
protected string $native,
40+
string $regex,
41+
protected string $mysql,
42+
) {
3843
if (! str_contains($regex, '[-_]')) {
3944
$regex = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $regex);
4045
}

libraries/classes/Normalization.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,12 @@ public function getHtmlForNewTables2NF(array $partialDependencies, string $table
498498
*
499499
* @return array{legendText: string, headText: string, queryError: bool, extra: Message}
500500
*/
501-
public function createNewTablesFor2NF(array $partialDependencies, object $tablesName, string $table, string $db): array
502-
{
501+
public function createNewTablesFor2NF(
502+
array $partialDependencies,
503+
object $tablesName,
504+
string $table,
505+
string $db,
506+
): array {
503507
$dropCols = false;
504508
$nonPKCols = [];
505509
$queries = [];

libraries/classes/Operations.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,12 @@ public function getWarningMessagesArray(): array
756756
* @param string $newDb Database name after table renaming/ moving table
757757
* @param string $newTable Table name after table renaming/moving table
758758
*/
759-
public function adjustPrivilegesRenameOrMoveTable(string $oldDb, string $oldTable, string $newDb, string $newTable): void
760-
{
759+
public function adjustPrivilegesRenameOrMoveTable(
760+
string $oldDb,
761+
string $oldTable,
762+
string $newDb,
763+
string $newTable,
764+
): void {
761765
if (! $GLOBALS['table_priv'] || ! $GLOBALS['col_priv'] || ! $GLOBALS['is_reload_priv']) {
762766
return;
763767
}

libraries/classes/Plugins/ExportPlugin.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,13 @@ public function initAlias(array $aliases, string &$db, string|null &$table = nul
263263
*
264264
* @return string alias of the identifier if found or ''
265265
*/
266-
public function getAlias(array $aliases, string $id, string $type = 'dbtblcol', string $db = '', string $tbl = ''): string
267-
{
266+
public function getAlias(
267+
array $aliases,
268+
string $id,
269+
string $type = 'dbtblcol',
270+
string $db = '',
271+
string $tbl = '',
272+
): string {
268273
if ($db !== '' && isset($aliases[$db])) {
269274
$aliases = [
270275
$db => $aliases[$db],

0 commit comments

Comments
 (0)