From 0a283a68b731220bbde61a18b4e7b9704e116842 Mon Sep 17 00:00:00 2001 From: 3x1io <3x1io@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:43:27 +0000 Subject: [PATCH] Format Code --- config/filament-types.php | 2 +- src/Filament/Resources/TypeResource.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/filament-types.php b/config/filament-types.php index 578d8ff..a2fa38e 100644 --- a/config/filament-types.php +++ b/config/filament-types.php @@ -19,7 +19,7 @@ * Panel Navigation * Accepts: boolean OR array of panel ID with boolean * If array is empty, assumes to not display navigation item. - * + * * Panel Example: * 'panel_navigation' => ['admin' => TRUE]; */ diff --git a/src/Filament/Resources/TypeResource.php b/src/Filament/Resources/TypeResource.php index c67b5e6..78d2188 100644 --- a/src/Filament/Resources/TypeResource.php +++ b/src/Filament/Resources/TypeResource.php @@ -2,6 +2,7 @@ namespace TomatoPHP\FilamentTypes\Filament\Resources; +use Filament\Facades\Filament; use Filament\Forms\Form; use Filament\Resources\Concerns\Translatable; use Filament\Resources\Resource; @@ -9,7 +10,6 @@ use TomatoPHP\FilamentTypes\Filament\Resources\TypeResource\Form\TypeForm; use TomatoPHP\FilamentTypes\Filament\Resources\TypeResource\Table\TypeTable; use TomatoPHP\FilamentTypes\Models\Type; -use Filament\Facades\Filament; class TypeResource extends Resource { @@ -47,25 +47,25 @@ public static function getNavigationGroup(): ?string /** * Config Item: `panel_navigation` * Returns: bool - * + * * Accepts: array OR bool - * + * * Compares against current panel ID based on what is in the array (if provided). */ public static function shouldRegisterNavigation(): bool { - $configItem = config('filament-types.panel_navigation', TRUE); + $configItem = config('filament-types.panel_navigation', true); - if (is_array($configItem) && !empty($configItem)) { + if (is_array($configItem) && ! empty($configItem)) { foreach (config('filament-types.panel_navigation', true) as $key => $val) { if (Filament::getCurrentPanel()->getId() === $key) { return $val; } else { - return FALSE; + return false; } } } else { - return (empty($configItem)) ? FALSE : $configItem; + return (empty($configItem)) ? false : $configItem; } }