From a32309ea2ced5de6bea43aed3dc5aee06a9b9ad9 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Tue, 2 Sep 2025 09:28:48 +0200 Subject: [PATCH] replace `array_first` with `Arr:first` --- app/Filament/Server/Pages/Startup.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Filament/Server/Pages/Startup.php b/app/Filament/Server/Pages/Startup.php index 4e277f73b..a6410a56e 100644 --- a/app/Filament/Server/Pages/Startup.php +++ b/app/Filament/Server/Pages/Startup.php @@ -20,6 +20,7 @@ use Filament\Notifications\Notification; use Filament\Schemas\Components\Section; use Filament\Schemas\Schema; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; class Startup extends ServerFormPage @@ -168,7 +169,7 @@ class Startup extends ServerFormPage private function shouldHideComponent(ServerVariable $serverVariable, Component $component): bool { - $containsRuleIn = array_first($serverVariable->variable->rules, fn ($value) => str($value)->startsWith('in:'), false); + $containsRuleIn = Arr::first($serverVariable->variable->rules, fn ($value) => str($value)->startsWith('in:'), false); if ($component instanceof Select) { return !$containsRuleIn; @@ -186,7 +187,7 @@ class Startup extends ServerFormPage */ private function getSelectOptionsFromRules(ServerVariable $serverVariable): array { - $inRule = array_first($serverVariable->variable->rules, fn ($value) => str($value)->startsWith('in:')); + $inRule = Arr::first($serverVariable->variable->rules, fn ($value) => str($value)->startsWith('in:')); return str($inRule) ->after('in:')