Skip to content

Commit b2af6c0

Browse files
committed
Merge branch 'main' of github.com:vormkracht10/filament-fields
2 parents e7e6cde + a3c0f5b commit b2af6c0

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

.github/workflows/fix-php-code-style-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
ref: ${{ github.head_ref }}
2020

2121
- name: Fix PHP code style issues
22-
uses: aglipanci/laravel-pint-action@2.4
22+
uses: aglipanci/laravel-pint-action@2.5
2323

2424
- name: Commit changes
2525
uses: stefanzweifel/git-auto-commit-action@v5

src/Concerns/CanMapDynamicFields.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private function resolveFormFields(): array
108108
$customFields = $this->resolveCustomFields();
109109

110110
return $this->record->fields
111-
->map(fn($field) => $this->resolveFieldInput($field, $customFields))
111+
->map(fn ($field) => $this->resolveFieldInput($field, $customFields))
112112
->filter()
113113
->values()
114114
->all();
@@ -117,7 +117,7 @@ private function resolveFormFields(): array
117117
private function resolveCustomFields(): Collection
118118
{
119119
return collect(Fields::getFields())
120-
->map(fn($fieldClass) => new $fieldClass);
120+
->map(fn ($fieldClass) => new $fieldClass);
121121
}
122122

123123
private function resolveFieldInput(Model $field, Collection $customFields): ?object
@@ -136,4 +136,4 @@ private function resolveFieldInput(Model $field, Collection $customFields): ?obj
136136

137137
return null;
138138
}
139-
}
139+
}

src/Concerns/HasFields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ public function fields(): MorphMany
2121
return $this->morphMany(Field::class, 'ulid', 'model_type', 'model_key')
2222
->orderBy('position');
2323
}
24-
}
24+
}

src/Filament/RelationManagers/FieldsRelationManager.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function form(Form $form): Form
4343
->required()
4444
->placeholder(__('Name'))
4545
->live(debounce: 250)
46-
->afterStateUpdated(fn(Set $set, ?string $state) => $set('slug', Str::slug($state))),
46+
->afterStateUpdated(fn (Set $set, ?string $state) => $set('slug', Str::slug($state))),
4747

4848
TextInput::make('slug')
4949
->readonly(),
@@ -75,10 +75,10 @@ function () {
7575
]),
7676
Section::make('Configuration')
7777
->columns(3)
78-
->schema(fn(Get $get) => $this->getFieldTypeFormSchema(
78+
->schema(fn (Get $get) => $this->getFieldTypeFormSchema(
7979
$get('field_type')
8080
))
81-
->visible(fn(Get $get) => filled($get('field_type'))),
81+
->visible(fn (Get $get) => filled($get('field_type'))),
8282
]),
8383
]);
8484
}
@@ -198,4 +198,4 @@ public static function getPluralModelLabel(): string
198198
{
199199
return __('Fields');
200200
}
201-
}
201+
}

src/Models/Field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ public function tenant(): ?BelongsTo
4949

5050
return null;
5151
}
52-
}
52+
}

0 commit comments

Comments
 (0)