Skip to content

Commit e307980

Browse files
stengithub-actions[bot]
authored andcommitted
Fix styling
1 parent a5cfad6 commit e307980

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Filament/Form/Forms/MenuItemForm.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ protected static function getLabelField(): TextInput
8585
{
8686
return TextInput::make(static::FIELD_LABEL)
8787
->label(flexiblePagesTrans('menu_items.form.label_lbl'))
88-
->required(fn (Get $get): bool => !$get(static::FIELD_USE_MODEL_TITLE))
89-
->visible(fn (Get $get): bool => !$get(static::FIELD_USE_MODEL_TITLE))
88+
->required(fn (Get $get): bool => ! $get(static::FIELD_USE_MODEL_TITLE))
89+
->visible(fn (Get $get): bool => ! $get(static::FIELD_USE_MODEL_TITLE))
9090
->maxLength(255)
9191
->helperText(flexiblePagesTrans('menu_items.form.label_help'));
9292
}

src/Resources/MenuResource/Pages/ManageMenuItems.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)