From c848964bd64cb081a7e1c0d5d3ee6df3d6a5104f Mon Sep 17 00:00:00 2001 From: atmonshi Date: Sat, 13 Jan 2024 13:24:21 +0000 Subject: [PATCH] Fix styling --- src/Configuration.php | 10 +++++----- src/Filament/Resources/CategoryResource.php | 4 ++-- src/Filament/Resources/CollectionResource.php | 4 ++-- src/Filament/Resources/FormResource.php | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Configuration.php b/src/Configuration.php index 14cbfd0a..916f77da 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -238,19 +238,19 @@ public function getHiddenResources(): ?array return $this->hideResources; } - public function hideNavigationBadges(Closure|bool $show = false, ?Resources $resource = null): static + public function hideNavigationBadges(Closure | bool $show = false, ?Resources $resource = null): static { return $this->setShowNavigationBadges($show, $resource); } - public function showNavigationBadges(Closure|bool $show = true, ?Resources $resource = null): static + public function showNavigationBadges(Closure | bool $show = true, ?Resources $resource = null): static { return $this->setShowNavigationBadges($show, $resource); } - private function setShowNavigationBadges(Closure|bool $show = true, ?Resources $resource = null): static + private function setShowNavigationBadges(Closure | bool $show = true, ?Resources $resource = null): static { - if (!is_null($resource)) { + if (! is_null($resource)) { $this->showNavigationBadgesArray[$resource->value] = $show; } else { $this->showNavigationBadges = $show; @@ -261,7 +261,7 @@ private function setShowNavigationBadges(Closure|bool $show = true, ?Resources $ public function getShowNavigationBadges(?Resources $resource = null): bool { - if (!is_null($resource)) { + if (! is_null($resource)) { return $this->showNavigationBadgesArray[$resource->value] ?? $this->evaluate($this->showNavigationBadges); } diff --git a/src/Filament/Resources/CategoryResource.php b/src/Filament/Resources/CategoryResource.php index f01d807a..64c59956 100644 --- a/src/Filament/Resources/CategoryResource.php +++ b/src/Filament/Resources/CategoryResource.php @@ -48,11 +48,11 @@ public static function getModel(): string public static function getNavigationBadge(): ?string { - if (!BoltPlugin::getShowOrHideNavigationBadges(Resources::CategoryResource)) { + if (! BoltPlugin::getShowOrHideNavigationBadges(Resources::CategoryResource)) { return null; } - return (string)BoltPlugin::getModel('Category')::query()->count(); + return (string) BoltPlugin::getModel('Category')::query()->count(); } public static function getGloballySearchableAttributes(): array diff --git a/src/Filament/Resources/CollectionResource.php b/src/Filament/Resources/CollectionResource.php index b6cc3bfc..2c809a57 100644 --- a/src/Filament/Resources/CollectionResource.php +++ b/src/Filament/Resources/CollectionResource.php @@ -33,11 +33,11 @@ public static function getModel(): string public static function getNavigationBadge(): ?string { - if (!BoltPlugin::getShowOrHideNavigationBadges(Resources::CollectionResource)) { + if (! BoltPlugin::getShowOrHideNavigationBadges(Resources::CollectionResource)) { return null; } - return (string)BoltPlugin::getModel('Collection')::query()->count(); + return (string) BoltPlugin::getModel('Collection')::query()->count(); } public static function getGloballySearchableAttributes(): array diff --git a/src/Filament/Resources/FormResource.php b/src/Filament/Resources/FormResource.php index 043d6217..d29c92c0 100644 --- a/src/Filament/Resources/FormResource.php +++ b/src/Filament/Resources/FormResource.php @@ -58,11 +58,11 @@ public static function getModel(): string public static function getNavigationBadge(): ?string { - if (!BoltPlugin::getShowOrHideNavigationBadges(Resources::FormResource)) { + if (! BoltPlugin::getShowOrHideNavigationBadges(Resources::FormResource)) { return null; } - return (string)BoltPlugin::getModel('Form')::query()->count(); + return (string) BoltPlugin::getModel('Form')::query()->count(); } public static function getGloballySearchableAttributes(): array