From 58bfa122802b7612e7a7de9df99d144a66083647 Mon Sep 17 00:00:00 2001 From: MartinOscar <40749467+RMartinOscar@users.noreply.github.com> Date: Tue, 11 Jun 2024 18:22:37 +0200 Subject: [PATCH] Cleanup unused vars (#366) * Update app/Exceptions/Handler.php Co-authored-by: Boy132 --- app/Exceptions/Handler.php | 2 +- .../EggResource/RelationManagers/ServersRelationManager.php | 2 +- .../NodeResource/RelationManagers/NodesRelationManager.php | 2 +- app/Filament/Resources/ServerResource/Pages/ListServers.php | 2 +- .../UserResource/RelationManagers/ServersRelationManager.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 38f49c8ffb..d30475f668 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -215,7 +215,7 @@ protected function convertExceptionToArray(\Throwable $e, array $override = []): ->map(fn ($trace) => Arr::except($trace, ['args'])) ->all(), 'previous' => Collection::make($this->extractPrevious($e)) - ->map(fn ($exception) => $e->getTrace()) + ->map(fn ($exception) => $exception->getTrace()) ->map(fn ($trace) => Arr::except($trace, ['args'])) ->all(), ], diff --git a/app/Filament/Resources/EggResource/RelationManagers/ServersRelationManager.php b/app/Filament/Resources/EggResource/RelationManagers/ServersRelationManager.php index 3e72e42368..cffaa822b6 100644 --- a/app/Filament/Resources/EggResource/RelationManagers/ServersRelationManager.php +++ b/app/Filament/Resources/EggResource/RelationManagers/ServersRelationManager.php @@ -34,7 +34,7 @@ public function table(Table $table): Table ->label('Docker Image'), Tables\Columns\SelectColumn::make('allocation.id') ->label('Primary Allocation') - ->options(fn ($state, Server $server) => [$server->allocation->id => $server->allocation->address]) + ->options(fn (Server $server) => [$server->allocation->id => $server->allocation->address]) ->selectablePlaceholder(false) ->sortable(), ]); diff --git a/app/Filament/Resources/NodeResource/RelationManagers/NodesRelationManager.php b/app/Filament/Resources/NodeResource/RelationManagers/NodesRelationManager.php index b9775b4c20..4e3081f08e 100644 --- a/app/Filament/Resources/NodeResource/RelationManagers/NodesRelationManager.php +++ b/app/Filament/Resources/NodeResource/RelationManagers/NodesRelationManager.php @@ -34,7 +34,7 @@ public function table(Table $table): Table ->sortable(), Tables\Columns\SelectColumn::make('allocation.id') ->label('Primary Allocation') - ->options(fn ($state, Server $server) => [$server->allocation->id => $server->allocation->address]) + ->options(fn (Server $server) => [$server->allocation->id => $server->allocation->address]) ->selectablePlaceholder(false) ->sortable(), Tables\Columns\TextColumn::make('memory')->icon('tabler-device-desktop-analytics'), diff --git a/app/Filament/Resources/ServerResource/Pages/ListServers.php b/app/Filament/Resources/ServerResource/Pages/ListServers.php index 0f150144dc..00fff906e1 100644 --- a/app/Filament/Resources/ServerResource/Pages/ListServers.php +++ b/app/Filament/Resources/ServerResource/Pages/ListServers.php @@ -70,7 +70,7 @@ public function table(Table $table): Table ->sortable(), Tables\Columns\SelectColumn::make('allocation_id') ->label('Primary Allocation') - ->options(fn ($state, Server $server) => $server->allocations->mapWithKeys( + ->options(fn (Server $server) => $server->allocations->mapWithKeys( fn ($allocation) => [$allocation->id => $allocation->address]) ) ->selectablePlaceholder(false) diff --git a/app/Filament/Resources/UserResource/RelationManagers/ServersRelationManager.php b/app/Filament/Resources/UserResource/RelationManagers/ServersRelationManager.php index 7be484b60f..ce198e2d0b 100644 --- a/app/Filament/Resources/UserResource/RelationManagers/ServersRelationManager.php +++ b/app/Filament/Resources/UserResource/RelationManagers/ServersRelationManager.php @@ -68,7 +68,7 @@ public function table(Table $table): Table ->sortable(), Tables\Columns\SelectColumn::make('allocation.id') ->label('Primary Allocation') - ->options(fn ($state, Server $server) => [$server->allocation->id => $server->allocation->address]) + ->options(fn (Server $server) => [$server->allocation->id => $server->allocation->address]) ->selectablePlaceholder(false) ->sortable(), Tables\Columns\TextColumn::make('image')->hidden(),