Skip to content

Commit 4927d95

Browse files
BurntimeXdtdesign
andauthored
Apply suggestions from code review
Co-authored-by: Alexander Ebert <[email protected]>
1 parent abf5a7e commit 4927d95

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

wcfsetup/install/files/lib/system/endpoint/controller/core/labels/groups/ChangeLabelShowOrder.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public function __invoke(ServerRequestInterface $request, array $variables): Res
4343
return new JsonResponse([]);
4444
}
4545

46+
/**
47+
* @param list<ShowOrderItem> $items
48+
*/
4649
private function saveShowOrder(array $items): void
4750
{
4851
$sql = "UPDATE wcf1_label

wcfsetup/install/files/lib/system/endpoint/controller/core/labels/groups/ChangeShowOrder.class.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,11 @@ public function __invoke(ServerRequestInterface $request, array $variables): Res
3939
return new JsonResponse([]);
4040
}
4141

42+
/**
43+
* @param list<ShowOrderItem> $items
44+
*/
4245
private function saveShowOrder(array $items): void
4346
{
44-
$sql = "UPDATE wcf1_label
45-
SET showOrder = ?
46-
WHERE labelID = ?";
47-
$statement = WCF::getDB()->prepare($sql);
48-
4947
WCF::getDB()->beginTransaction();
5048
$sql = "UPDATE wcf1_label_group
5149
SET showOrder = ?

wcfsetup/install/files/lib/system/showOrder/ShowOrderHandler.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
final class ShowOrderHandler
1818
{
1919
/**
20-
* @var ShowOrderItem[]
20+
* @var list<ShowOrderItem>
2121
*/
2222
private readonly array $items;
2323

0 commit comments

Comments
 (0)