Skip to content

Commit

Permalink
style: fix code styling
Browse files Browse the repository at this point in the history
lukas-frey authored and github-actions[bot] committed Oct 18, 2023
1 parent 9b0e41c commit 4801324
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions src/Forms/Cluster.php
Original file line number Diff line number Diff line change
@@ -35,18 +35,18 @@ public function getResponsiveClasses(): array
$columns = $this->getColumnsConfig();

return [
"vertical" => data_get($columns, 'default', 1) === 1,
"horizontal" => data_get($columns, 'default', 1) > 1,
"sm:vertical" => data_get($columns, 'sm') === 1,
"sm:horizontal" => data_get($columns, 'sm') > 1,
"md:vertical" => data_get($columns, 'md') === 1,
"md:horizontal" => data_get($columns, 'md') > 1,
"lg:vertical" => data_get($columns, 'lg') === 1,
"lg:horizontal" => data_get($columns, 'lg') > 1,
"xl:vertical" => data_get($columns, 'xl') === 1,
"xl:horizontal" => data_get($columns, 'xl') > 1,
"2xl:vertical" => data_get($columns, '2xl') === 1,
"2xl:horizontal" => data_get($columns, '2xl') > 1,
'vertical' => data_get($columns, 'default', 1) === 1,
'horizontal' => data_get($columns, 'default', 1) > 1,
'sm:vertical' => data_get($columns, 'sm') === 1,
'sm:horizontal' => data_get($columns, 'sm') > 1,
'md:vertical' => data_get($columns, 'md') === 1,
'md:horizontal' => data_get($columns, 'md') > 1,
'lg:vertical' => data_get($columns, 'lg') === 1,
'lg:horizontal' => data_get($columns, 'lg') > 1,
'xl:vertical' => data_get($columns, 'xl') === 1,
'xl:horizontal' => data_get($columns, 'xl') > 1,
'2xl:vertical' => data_get($columns, '2xl') === 1,
'2xl:horizontal' => data_get($columns, '2xl') > 1,
];
}

@@ -56,7 +56,8 @@ public function getChildComponents(): array
parent::getChildComponents(),
function (Component $component) {
return $component
->fieldWrapperView('filament-clusters::field-wrapper');
->fieldWrapperView('filament-clusters::field-wrapper')
;
}
);
}
@@ -67,17 +68,19 @@ public static function make(array $schema = []): static
'name' => 'cluster',
])
->when(
!empty($schema),
fn(Component $component) => $component->schema($schema)
! empty($schema),
fn (Component $component) => $component->schema($schema)
)
->required(
fn(Cluster $component) => Arr::first(
$component->getChildComponents(),
fn(Component $component) => $component instanceof Field && $component->isRequired()
) !== null
);
fn (Cluster $component) => Arr::first(
$component->getChildComponents(),
fn (Component $component) => $component instanceof Field && $component->isRequired()
) !== null
)
;

return $component
->columns(count($component->getChildComponents()));
->columns(count($component->getChildComponents()))
;
}
}

0 comments on commit 4801324

Please sign in to comment.