From ab2314f4883549ab21673fe3d74088685c749a89 Mon Sep 17 00:00:00 2001 From: atmonshi Date: Mon, 12 Aug 2024 02:38:03 +0000 Subject: [PATCH] Fix styling --- src/Configuration.php | 2 +- src/DynamicDashboardPlugin.php | 2 +- src/Facades/DynamicDashboard.php | 4 ++-- src/Filament/Resources/LayoutResource/Pages/CreateLayout.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Configuration.php b/src/Configuration.php index 8eb6194..1859255 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -40,7 +40,7 @@ public static function getModel(string $model): string { return array_merge( config('zeus-dynamic-dashboard.models'), - (new static())::get()->getModels() + (new static)::get()->getModels() )[$model]; } diff --git a/src/DynamicDashboardPlugin.php b/src/DynamicDashboardPlugin.php index 149e113..754ff94 100644 --- a/src/DynamicDashboardPlugin.php +++ b/src/DynamicDashboardPlugin.php @@ -27,7 +27,7 @@ public function register(Panel $panel): void public static function make(): static { - return new self(); + return new self; } public static function get(): static diff --git a/src/Facades/DynamicDashboard.php b/src/Facades/DynamicDashboard.php index 5284aa8..6ee1293 100644 --- a/src/Facades/DynamicDashboard.php +++ b/src/Facades/DynamicDashboard.php @@ -21,7 +21,7 @@ public static function loadClasses(string $path, string $namespace): array $classes = []; $path = array_unique(Arr::wrap($path)); - foreach ((new Finder())->in($path)->files() as $className) { + foreach ((new Finder)->in($path)->files() as $className) { $classes[] = $namespace . $className->getFilenameWithoutExtension(); } @@ -75,7 +75,7 @@ protected static function setLayout(array $classes): array $allWidgets = []; foreach ($classes as $widget) { - $widgetClass = new $widget(); + $widgetClass = new $widget; if ($widgetClass instanceof Widget && $widgetClass->enabled()) { $allWidgets[] = $widgetClass->form(); diff --git a/src/Filament/Resources/LayoutResource/Pages/CreateLayout.php b/src/Filament/Resources/LayoutResource/Pages/CreateLayout.php index a8fecbb..f0aec1f 100644 --- a/src/Filament/Resources/LayoutResource/Pages/CreateLayout.php +++ b/src/Filament/Resources/LayoutResource/Pages/CreateLayout.php @@ -37,7 +37,7 @@ public function mount(?int $record = null): void { if ($record === null) { $layoutModel = DynamicDashboardPlugin::get()->getModel('Layout'); - $this->dashLayout = new $layoutModel(); + $this->dashLayout = new $layoutModel; foreach (DynamicDashboardPlugin::get()->getModel('Columns')::all() as $column) { $this->{'widgetsFrom' . $column->key}->fill([ 'widgetsData.' . $column->key => [],