Skip to content

Commit

Permalink
Format Code
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io authored and github-actions[bot] committed Nov 28, 2024
1 parent bbe8862 commit 0a283a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/filament-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
*/
Expand Down
14 changes: 7 additions & 7 deletions src/Filament/Resources/TypeResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace TomatoPHP\FilamentTypes\Filament\Resources;

use Filament\Facades\Filament;
use Filament\Forms\Form;
use Filament\Resources\Concerns\Translatable;
use Filament\Resources\Resource;
use Filament\Tables\Table;
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
{
Expand Down Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 0a283a6

Please sign in to comment.