From d794f97fccb8ba3eab764f4acf57a0ddf8410fd6 Mon Sep 17 00:00:00 2001 From: saade Date: Fri, 18 Aug 2023 21:29:32 +0000 Subject: [PATCH] Fix styling --- src/Foms/Components/Actions/AddAction.php | 2 +- src/Foms/Components/Actions/AddChildAction.php | 2 +- src/Foms/Components/Actions/ReorderAction.php | 2 -- src/Foms/Components/AdjacencyList.php | 5 ++--- src/Foms/Components/Concerns/HasForm.php | 6 +++--- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Foms/Components/Actions/AddAction.php b/src/Foms/Components/Actions/AddAction.php index c5960d1..95da041 100644 --- a/src/Foms/Components/Actions/AddAction.php +++ b/src/Foms/Components/Actions/AddAction.php @@ -5,8 +5,8 @@ use Filament\Forms\Components\Actions\Action; use Filament\Forms\Form; use Filament\Support\Enums\ActionSize; -use Saade\FilamentAdjacencyList\Foms\Components\AdjacencyList; use Illuminate\Support\Str; +use Saade\FilamentAdjacencyList\Foms\Components\AdjacencyList; class AddAction extends Action { diff --git a/src/Foms/Components/Actions/AddChildAction.php b/src/Foms/Components/Actions/AddChildAction.php index 40ef717..2f6b6e9 100644 --- a/src/Foms/Components/Actions/AddChildAction.php +++ b/src/Foms/Components/Actions/AddChildAction.php @@ -5,8 +5,8 @@ use Filament\Forms\Components\Actions\Action; use Filament\Forms\Form; use Filament\Support\Enums\ActionSize; -use Saade\FilamentAdjacencyList\Foms\Components\AdjacencyList; use Illuminate\Support\Str; +use Saade\FilamentAdjacencyList\Foms\Components\AdjacencyList; class AddChildAction extends Action { diff --git a/src/Foms/Components/Actions/ReorderAction.php b/src/Foms/Components/Actions/ReorderAction.php index 3c163ae..7e535b0 100644 --- a/src/Foms/Components/Actions/ReorderAction.php +++ b/src/Foms/Components/Actions/ReorderAction.php @@ -3,10 +3,8 @@ namespace Saade\FilamentAdjacencyList\Foms\Components\Actions; use Filament\Forms\Components\Actions\Action; -use Filament\Forms\Form; use Filament\Support\Enums\ActionSize; use Saade\FilamentAdjacencyList\Foms\Components\AdjacencyList; -use Illuminate\Support\Str; class ReorderAction extends Action { diff --git a/src/Foms/Components/AdjacencyList.php b/src/Foms/Components/AdjacencyList.php index 848b84f..a78eab7 100644 --- a/src/Foms/Components/AdjacencyList.php +++ b/src/Foms/Components/AdjacencyList.php @@ -6,7 +6,6 @@ use Filament\Forms; use Filament\Forms\Components\Actions\Action; use Illuminate\Support\Str; -use Saade\FilamentAdjacencyList\Foms\Components\Concerns; class AdjacencyList extends Forms\Components\Field { @@ -24,7 +23,7 @@ protected function setUp(): void parent::setUp(); $this->afterStateHydrated(function (AdjacencyList $component, ?array $state) { - if (!$state) { + if (! $state) { $component->state([]); } }); @@ -55,7 +54,7 @@ function (AdjacencyList $component, string $targetStatePath, array $targetItemsS $items[$uuid] = $item; } - if (!$targetStatePath) { + if (! $targetStatePath) { $state = $items; } else { data_set($state, $targetStatePath, $items); diff --git a/src/Foms/Components/Concerns/HasForm.php b/src/Foms/Components/Concerns/HasForm.php index 66d81fa..a9c5af5 100644 --- a/src/Foms/Components/Concerns/HasForm.php +++ b/src/Foms/Components/Concerns/HasForm.php @@ -3,8 +3,8 @@ namespace Saade\FilamentAdjacencyList\Foms\Components\Concerns; use Closure; -use Filament\Forms\Form; use Filament\Forms; +use Filament\Forms\Form; trait HasForm { @@ -21,7 +21,7 @@ public function form(array | Closure | null $form): static public function getForm(Form $form): ?Form { - if (!$this->hasModal()) { + if (! $this->hasModal()) { return null; } @@ -34,7 +34,7 @@ public function getForm(Form $form): ?Form ]); } - if (is_array($modifiedForm) && (!count($modifiedForm))) { + if (is_array($modifiedForm) && (! count($modifiedForm))) { return null; }