File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -909,11 +909,12 @@ public function moveItemUp(int $itemId): void
909
909
{
910
910
try {
911
911
$ item = $ this ->getMenuItemSecurely ($ itemId );
912
- if (!$ item ) {
912
+ if (! $ item ) {
913
913
Notification::make ()
914
914
->title (flexiblePagesTrans ('menu_items.errors.item_not_found ' ))
915
915
->danger ()
916
916
->send ();
917
+
917
918
return ;
918
919
}
919
920
@@ -922,15 +923,15 @@ public function moveItemUp(int $itemId): void
922
923
if ($ previousSibling ) {
923
924
$ item ->beforeNode ($ previousSibling )->save ();
924
925
$ this ->refreshTree ();
925
-
926
+
926
927
Notification::make ()
927
928
->title ('Menu item moved up successfully. ' )
928
929
->success ()
929
930
->send ();
930
931
}
931
932
} catch (Exception $ e ) {
932
933
Notification::make ()
933
- ->title ('Failed to move menu item: ' . $ e ->getMessage ())
934
+ ->title ('Failed to move menu item: ' . $ e ->getMessage ())
934
935
->danger ()
935
936
->send ();
936
937
}
@@ -940,11 +941,12 @@ public function moveItemDown(int $itemId): void
940
941
{
941
942
try {
942
943
$ item = $ this ->getMenuItemSecurely ($ itemId );
943
- if (!$ item ) {
944
+ if (! $ item ) {
944
945
Notification::make ()
945
946
->title (flexiblePagesTrans ('menu_items.errors.item_not_found ' ))
946
947
->danger ()
947
948
->send ();
949
+
948
950
return ;
949
951
}
950
952
@@ -953,15 +955,15 @@ public function moveItemDown(int $itemId): void
953
955
if ($ nextSibling ) {
954
956
$ item ->afterNode ($ nextSibling )->save ();
955
957
$ this ->refreshTree ();
956
-
958
+
957
959
Notification::make ()
958
960
->title ('Menu item moved down successfully. ' )
959
961
->success ()
960
962
->send ();
961
963
}
962
964
} catch (Exception $ e ) {
963
965
Notification::make ()
964
- ->title ('Failed to move menu item: ' . $ e ->getMessage ())
966
+ ->title ('Failed to move menu item: ' . $ e ->getMessage ())
965
967
->danger ()
966
968
->send ();
967
969
}
You can’t perform that action at this time.
0 commit comments