Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/Concerns/HandlesOverlookWidgetCustomization.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

namespace Awcodes\Overlook\Concerns;

use Illuminate\Database\Eloquent\Builder;
Expand Down
34 changes: 16 additions & 18 deletions src/OverlookPlugin.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

namespace Awcodes\Overlook;

use Closure;
Expand All @@ -11,26 +9,26 @@
use Filament\Panel;
use Filament\Support\Concerns\EvaluatesClosures;

final class OverlookPlugin implements Plugin
class OverlookPlugin implements Plugin
{
use EvaluatesClosures;
use HasColumns;

protected array|Closure|null $excludes = null;
protected array | Closure | null $excludes = null;

protected array|Closure|null $includes = null;
protected array | Closure | null $includes = null;

protected bool|Closure|null $shouldAbbreviateCount = null;
protected bool | Closure | null $shouldAbbreviateCount = null;

protected bool|Closure|null $shouldShowTooltips = null;
protected bool | Closure | null $shouldShowTooltips = null;

protected int|Closure|null $shouldSortAlphabetical = null;
protected bool | Closure | null $shouldSortAlphabetical = null;

protected int|Closure|null $sort = null;
protected int | Closure | null $sort = null;

protected array|Closure|null $icons = null;
protected array | Closure | null $icons = null;

public static function make(): static
public static function make(): OverlookPlugin
{
return app(self::class);
}
Expand All @@ -49,21 +47,21 @@ public function register(Panel $panel): void {}

public function boot(Panel $panel): void {}

public function alphabetical(bool|Closure|null $condition = true): static
public function alphabetical(bool | Closure | null $condition = true): static
{
$this->shouldSortAlphabetical = $condition;

return $this;
}

public function abbreviateCount(bool|Closure|null $condition = true): static
public function abbreviateCount(bool | Closure | null $condition = true): static
{
$this->shouldAbbreviateCount = $condition;

return $this;
}

public function excludes(array|Closure $resources): static
public function excludes(array | Closure $resources): static
{
$this->excludes = $resources;

Expand Down Expand Up @@ -101,7 +99,7 @@ public function getSort(): int
return $this->evaluate($this->sort) ?? -1;
}

public function includes(array|Closure $resources): static
public function includes(array | Closure $resources): static
{
$this->includes = $resources;

Expand All @@ -123,21 +121,21 @@ public function shouldSortAlphabetical(): bool
return $this->evaluate($this->shouldSortAlphabetical) ?? false;
}

public function sort(int|Closure $sort): static
public function sort(int | Closure $sort): static
{
$this->sort = $sort;

return $this;
}

public function tooltips(bool|Closure|null $condition = true): static
public function tooltips(bool | Closure | null $condition = true): static
{
$this->shouldShowTooltips = $condition;

return $this;
}

public function icons(array|Closure|null $icons): static
public function icons(array | Closure | null $icons): static
{
$this->icons = $icons;

Expand Down
4 changes: 1 addition & 3 deletions src/OverlookServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<?php

declare(strict_types=1);

namespace Awcodes\Overlook;

use Livewire\Livewire;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;

final class OverlookServiceProvider extends PackageServiceProvider
class OverlookServiceProvider extends PackageServiceProvider
{
public function configurePackage(Package $package): void
{
Expand Down
6 changes: 2 additions & 4 deletions src/Widgets/OverlookWidget.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

namespace Awcodes\Overlook\Widgets;

use Awcodes\Overlook\Contracts\CustomizeOverlookWidget;
Expand All @@ -10,7 +8,7 @@
use Filament\Widgets\Widget;
use NumberFormatter;

final class OverlookWidget extends Widget
class OverlookWidget extends Widget
{
public array $data = [];

Expand All @@ -24,7 +22,7 @@ final class OverlookWidget extends Widget

protected static string $view = 'overlook::widget';

protected int|string|array $columnSpan = 'full';
protected int | string | array $columnSpan = 'full';

public static function getSort(): int
{
Expand Down