@@ -87,10 +87,11 @@ protected function getHeaderActions(): array
8787 ->form ($ this ->getMenuItemFormSchema ())
8888 ->fillForm (function (array $ arguments ): array {
8989 $ parentId = $ arguments ['parent_id ' ] ?? null ;
90+
9091 return [
9192 'parent_id ' => $ parentId ,
9293 'is_visible ' => true ,
93- 'target ' => '_self '
94+ 'target ' => '_self ' ,
9495 ];
9596 })
9697 ->action (function (array $ data , array $ arguments ): void {
@@ -103,7 +104,8 @@ protected function getHeaderActions(): array
103104 })
104105 ->modalHeading (function (array $ arguments ): string {
105106 $ parentId = $ arguments ['parent_id ' ] ?? null ;
106- return $ parentId
107+
108+ return $ parentId
107109 ? flexiblePagesTrans ('menu_items.tree.add_child ' )
108110 : flexiblePagesTrans ('menu_items.tree.add_item ' );
109111 })
@@ -121,20 +123,18 @@ protected function getActions(): array
121123 ];
122124 }
123125
124-
125-
126126 public function editMenuItemAction (): Action
127127 {
128128 return Action::make ('editMenuItem ' )
129129 ->form ($ this ->getMenuItemFormSchema ())
130130 ->fillForm (function (array $ arguments ): array {
131131 $ itemId = $ arguments ['itemId ' ] ?? null ;
132- if (!$ itemId ) {
132+ if (! $ itemId ) {
133133 return [];
134134 }
135-
135+
136136 $ item = $ this ->getMenuItemSecurely ($ itemId );
137- if (!$ item ) {
137+ if (! $ item ) {
138138 return [];
139139 }
140140
@@ -752,7 +752,7 @@ public function updateMenuItem(int $itemId, array $data): void
752752 protected function validateMenuItemData (array $ data ): void
753753 {
754754 // Label is only required if use_model_title is false
755- if (empty ($ data ['label ' ]) && !($ data ['use_model_title ' ] ?? false )) {
755+ if (empty ($ data ['label ' ]) && ! ($ data ['use_model_title ' ] ?? false )) {
756756 throw new Exception (flexiblePagesTrans ('menu_items.form.label_lbl ' ).' is required ' );
757757 }
758758
0 commit comments