Skip to content

Commit 3a21def

Browse files
Baspagithub-actions[bot]
authored andcommitted
fix: styling
1 parent ea734bc commit 3a21def

File tree

7 files changed

+18
-21
lines changed

7 files changed

+18
-21
lines changed

packages/filament-uploadcare-field/src/Forms/Components/Uploadcare.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@ public function getState(): mixed
298298

299299
// Handle array of file objects (extract UUIDs / URLs)
300300
if (is_array($state) && ! empty($state)) {
301-
$values = self::extractValues($state);
302-
if (! empty($values)) {
303-
$state = $values;
304-
}
301+
$values = self::extractValues($state);
302+
if (! empty($values)) {
303+
$state = $values;
304+
}
305305
}
306306

307307
if ($state === '[]' || $state === '""' || $state === null || $state === '') {
@@ -407,7 +407,7 @@ private static function extractValues(array $state): array
407407
foreach ($keys as $key) {
408408
$values = \Illuminate\Support\Arr::pluck($state, $key);
409409
$filtered = array_filter($values);
410-
410+
411411
if (! empty($filtered)) {
412412
return array_values($filtered);
413413
}

packages/uploadcare-field/database/migrations/2025_12_17_000001_repair_uploadcare_media_relationships.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ public function up(): void
271271
$position++;
272272
$ensureRelationship($rowUlid, $media->ulid, $position, $meta);
273273
$newUlids[] = $media->ulid;
274+
274275
continue;
275276
}
276277

@@ -345,5 +346,3 @@ public function down(): void
345346
//
346347
}
347348
};
348-
349-

packages/uploadcare-field/src/Observers/ContentFieldValueObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function saved(ContentFieldValue $contentFieldValue): void
4040
return;
4141
}
4242
}
43-
43+
4444
$this->syncRelationships($contentFieldValue, $mediaData, $modifiedValue);
4545
}
4646

packages/uploadcare-field/src/Uploadcare.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,27 @@ public static function make(string $name, Field $field): Input
4343
input: Input::make($name)
4444
->withMetadata()
4545
->removeCopyright()
46-
->dehydrateStateUsing(function ($state) use ($name, $field) {
46+
->dehydrateStateUsing(function ($state) {
4747
if (is_string($state) && json_validate($state)) {
4848
return json_decode($state, true);
4949
}
5050

5151
return $state;
5252
})
53-
->afterStateHydrated(function ($component, $state) use ($name, $field) {
53+
->afterStateHydrated(function ($component, $state) {
5454
$newState = $state;
5555

5656
if (is_string($state) && json_validate($state)) {
5757
$newState = json_decode($state, true);
5858
}
5959

6060
if ($newState !== $state) {
61-
$component->state($newState);
61+
$component->state($newState);
6262
}
6363
}),
6464
field: $field
6565
);
6666

67-
6867
$isMultiple = $field->config['multiple'] ?? self::getDefaultConfig()['multiple'];
6968
$acceptedFileTypes = self::parseAcceptedFileTypes($field);
7069

@@ -874,7 +873,7 @@ private static function hydrateBackstageUlids(mixed $value): ?array
874873
}
875874

876875
$mediaModel = self::getMediaModel();
877-
876+
878877
// Find all strings that look like ULIDs
879878
$potentialUlids = array_filter(Arr::flatten($value), function ($item) {
880879
return is_string($item) && ! json_validate($item);
@@ -885,7 +884,7 @@ private static function hydrateBackstageUlids(mixed $value): ?array
885884
}
886885

887886
$mediaItems = $mediaModel::whereIn('ulid', $potentialUlids)->get();
888-
887+
889888
$resolve = function ($item) use ($mediaItems, &$resolve) {
890889
if (is_array($item)) {
891890
return array_map($resolve, $item);
@@ -895,21 +894,20 @@ private static function hydrateBackstageUlids(mixed $value): ?array
895894
// Try to find media
896895
$media = $mediaItems->firstWhere('ulid', $item);
897896
if ($media) {
898-
return $media->load('edits');
897+
return $media->load('edits');
899898
}
900899

901900
return null;
902901
}
903-
902+
904903
return $item;
905904
};
906905

907906
$hydrated = array_map($resolve, $value);
908-
907+
909908
// Filter out nulls from the top level (invalid ULIDs)
910909
$hydrated = array_values(array_filter($hydrated));
911910

912911
return ! empty($hydrated) ? $hydrated : null;
913912
}
914-
915913
}

packages/users/src/Resources/RoleResource/Pages/EditRole.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static function getResource(): string
1515
{
1616
return config('backstage.users.resources.roles', RoleResource::class);
1717
}
18-
18+
1919
protected function getHeaderActions(): array
2020
{
2121
return [

packages/users/src/Resources/RoleResource/Pages/ListRoles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static function getResource(): string
1212
{
1313
return config('backstage.users.resources.roles', RoleResource::class);
1414
}
15-
15+
1616
protected function getHeaderActions(): array
1717
{
1818
return [

packages/users/src/Resources/RoleResource/Pages/ViewRole.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static function getResource(): string
1212
{
1313
return config('backstage.users.resources.roles', RoleResource::class);
1414
}
15-
15+
1616
protected function getHeaderActions(): array
1717
{
1818
return [

0 commit comments

Comments
 (0)