Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi authored and github-actions[bot] committed Jan 13, 2024
1 parent 135dd7a commit c848964
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Filament/Resources/CategoryResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Filament/Resources/CollectionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Filament/Resources/FormResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c848964

Please sign in to comment.