Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e5698c8

Browse filesBrowse files
committed
Require single line for function calls
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent 437215c commit e5698c8
Copy full SHA for e5698c8

File tree

Expand file treeCollapse file tree

68 files changed

+113
-508
lines changed
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

68 files changed

+113
-508
lines changed
Open diff view settings
Collapse file

‎libraries/classes/Bookmark.php‎

Copy file name to clipboardExpand all lines: libraries/classes/Bookmark.php
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,7 @@ public static function getList(
237237

238238
$query .= ' ORDER BY label ASC';
239239

240-
$result = $dbi->fetchResult(
241-
$query,
242-
null,
243-
null,
244-
Connection::TYPE_CONTROL,
245-
);
240+
$result = $dbi->fetchResult($query, null, null, Connection::TYPE_CONTROL);
246241

247242
$bookmarks = [];
248243
foreach ($result as $row) {
Collapse file

‎libraries/classes/Config.php‎

Copy file name to clipboardExpand all lines: libraries/classes/Config.php
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,10 +849,7 @@ public function getRootPath(): string
849849

850850
$parsedUrlPath = Routing::getCleanPathInfo();
851851

852-
$parts = explode(
853-
'/',
854-
$parsedUrlPath,
855-
);
852+
$parts = explode('/', $parsedUrlPath);
856853

857854
/* Remove filename */
858855
if (substr($parts[count($parts) - 1], -4) === '.php') {
Collapse file

‎libraries/classes/Config/Forms/Page/PageFormList.php‎

Copy file name to clipboardExpand all lines: libraries/classes/Config/Forms/Page/PageFormList.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class PageFormList extends BaseFormList
1818
'DbStructure' => DbStructureForm::class,
1919
'Edit' => EditForm::class,
2020
'Export' => ExportForm::class,
21-
'Import' => ImportForm::class,
21+
'Import' => ImportForm::class,
2222
'Navi' => NaviForm::class,
2323
'Sql' => SqlForm::class,
2424
'TableStructure' => TableStructureForm::class,
Collapse file

‎libraries/classes/ConfigStorage/Relation.php‎

Copy file name to clipboardExpand all lines: libraries/classes/ConfigStorage/Relation.php
+2-9Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,7 @@ public function getDisplayField(string $db, string $table): string|false
498498
. ' WHERE `db_name` = ' . $this->dbi->quoteString($db)
499499
. ' AND `table_name` = ' . $this->dbi->quoteString($table);
500500

501-
$row = $this->dbi->fetchSingleRow(
502-
$dispQuery,
503-
DatabaseInterface::FETCH_ASSOC,
504-
Connection::TYPE_CONTROL,
505-
);
501+
$row = $this->dbi->fetchSingleRow($dispQuery, DatabaseInterface::FETCH_ASSOC, Connection::TYPE_CONTROL);
506502
if (isset($row['display_field'])) {
507503
return $row['display_field'];
508504
}
@@ -1073,10 +1069,7 @@ public function getForeignData(
10731069
}
10741070
}
10751071

1076-
$disp = $this->dbi->tryQuery(
1077-
$fQueryMain . $fQueryFrom . $fQueryFilter
1078-
. $fQueryOrder . $fQueryLimit,
1079-
);
1072+
$disp = $this->dbi->tryQuery($fQueryMain . $fQueryFrom . $fQueryFilter . $fQueryOrder . $fQueryLimit);
10801073
if ($disp && $disp->numRows() > 0) {
10811074
// If a resultset has been created, pre-cache it in the $disp_row
10821075
// array. This helps us from not needing to use mysql_data_seek by
Collapse file

‎libraries/classes/Controllers/Database/OperationsController.php‎

Copy file name to clipboardExpand all lines: libraries/classes/Controllers/Database/OperationsController.php
+2-10Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,11 @@ public function __invoke(ServerRequest $request): void
121121
);
122122

123123
// handle the views
124-
$this->operations->handleTheViews(
125-
$views,
126-
$move,
127-
$GLOBALS['db'],
128-
$newDatabaseName,
129-
);
124+
$this->operations->handleTheViews($views, $move, $GLOBALS['db'], $newDatabaseName);
130125

131126
// now that all tables exist, create all the accumulated constraints
132127
if ($sqlConstraints !== []) {
133-
$this->operations->createAllAccumulatedConstraints(
134-
$sqlConstraints,
135-
$newDatabaseName,
136-
);
128+
$this->operations->createAllAccumulatedConstraints($sqlConstraints, $newDatabaseName);
137129
}
138130

139131
if ($this->dbi->getVersion() >= 50100) {
Collapse file

‎libraries/classes/Controllers/Database/StructureController.php‎

Copy file name to clipboardExpand all lines: libraries/classes/Controllers/Database/StructureController.php
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -801,11 +801,7 @@ protected function getValuesForAriaTable(
801801
$sumSize += $tblsize;
802802
[$formattedSize, $unit] = Util::formatByteDown($tblsize, 3, $tblsize > 0 ? 1 : 0);
803803
if (isset($currentTable['Data_free']) && $currentTable['Data_free'] > 0) {
804-
[$formattedOverhead, $overheadUnit] = Util::formatByteDown(
805-
$currentTable['Data_free'],
806-
3,
807-
1,
808-
);
804+
[$formattedOverhead, $overheadUnit] = Util::formatByteDown($currentTable['Data_free'], 3, 1);
809805
$overheadSize += $currentTable['Data_free'];
810806
}
811807
}
Collapse file

‎libraries/classes/Controllers/HomeController.php‎

Copy file name to clipboardExpand all lines: libraries/classes/Controllers/HomeController.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ private function checkPhpExtensionsRequirements(): void
453453
}
454454

455455
$this->errors[] = [
456-
'message' => __(
456+
'message' => __(
457457
'The curl extension was not found and allow_url_fopen is '
458458
. 'disabled. Due to this some features such as error reporting '
459459
. 'or version check are disabled.',
Collapse file

‎libraries/classes/Controllers/Import/ImportController.php‎

Copy file name to clipboardExpand all lines: libraries/classes/Controllers/Import/ImportController.php
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,7 @@ public function __invoke(ServerRequest $request): void
175175
// do a dynamic reload if table is RENAMED
176176
// (by sending the instruction to the AJAX response handler)
177177
if (
178-
preg_match(
179-
'/^RENAME\s+TABLE\s+(.*?)\s+TO\s+(.*?)($|;|\s)/i',
180-
$GLOBALS['sql_query'],
181-
$renameTableNames,
182-
)
178+
preg_match('/^RENAME\s+TABLE\s+(.*?)\s+TO\s+(.*?)($|;|\s)/i', $GLOBALS['sql_query'], $renameTableNames)
183179
) {
184180
$GLOBALS['ajax_reload']['reload'] = true;
185181
$GLOBALS['ajax_reload']['table_name'] = Util::unQuote($renameTableNames[2]);
Collapse file

‎libraries/classes/Controllers/NavigationController.php‎

Copy file name to clipboardExpand all lines: libraries/classes/Controllers/NavigationController.php
+2-10Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,15 @@ public function __invoke(ServerRequest $request): void
6363

6464
if ($request->getParsedBodyParam('hideNavItem') !== null) {
6565
if ($itemName !== '' && $itemType !== '' && $dbName !== '') {
66-
$this->navigation->hideNavigationItem(
67-
$itemName,
68-
$itemType,
69-
$dbName,
70-
);
66+
$this->navigation->hideNavigationItem($itemName, $itemType, $dbName);
7167
}
7268

7369
return;
7470
}
7571

7672
if ($request->hasBodyParam('unhideNavItem')) {
7773
if ($itemName !== '' && $itemType !== '' && $dbName !== '') {
78-
$this->navigation->unhideNavigationItem(
79-
$itemName,
80-
$itemType,
81-
$dbName,
82-
);
74+
$this->navigation->unhideNavigationItem($itemName, $itemType, $dbName);
8375
}
8476

8577
return;
Collapse file

‎libraries/classes/Controllers/Normalization/AddNewPrimaryController.php‎

Copy file name to clipboardExpand all lines: libraries/classes/Controllers/Normalization/AddNewPrimaryController.php
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ public function __invoke(ServerRequest $request): void
3333
'Field' => $tableName . '_id',
3434
'Extra' => 'auto_increment',
3535
];
36-
$html = $this->normalization->getHtmlForCreateNewColumn(
37-
$numFields,
38-
$dbName,
39-
$tableName,
40-
$columnMeta,
41-
);
36+
$html = $this->normalization->getHtmlForCreateNewColumn($numFields, $dbName, $tableName, $columnMeta);
4237
$html .= Url::getHiddenInputs($dbName, $tableName);
4338
$this->response->addHTML($html);
4439
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.