From 28e065b63db99605fd5e54adf45dc4e0c493add1 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Tue, 7 Jul 2026 05:08:18 +0000 Subject: [PATCH] Apply fixes from StyleCI --- app/Actions/Device/SetDeviceAvailability.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Actions/Device/SetDeviceAvailability.php b/app/Actions/Device/SetDeviceAvailability.php index 85200c871b..37c238df57 100644 --- a/app/Actions/Device/SetDeviceAvailability.php +++ b/app/Actions/Device/SetDeviceAvailability.php @@ -21,7 +21,7 @@ public function execute(Device $device, array $results): bool $connectivity = new ConnectivityHelper($device); // Determine which sources are currently enabled on this device - $enabled = collect(['icmp', 'snmp'])->filter(fn($source) => $connectivity->{"{$source}IsEnabled"}()); + $enabled = collect(['icmp', 'snmp'])->filter(fn ($source) => $connectivity->{"{$source}IsEnabled"}()); // Normalize keys: AvailabilitySource enum values or plain strings $checked = collect($results)->mapWithKeys(function ($passed, $source) { @@ -31,11 +31,11 @@ public function execute(Device $device, array $results): bool }); // Previously failing sources that weren't checked this run are still considered failing - $previously_failed = collect(explode(',', (string) $device->status_reason))->map(fn($s) => trim($s))->filter(); + $previously_failed = collect(explode(',', (string) $device->status_reason))->map(fn ($s) => trim($s))->filter(); $unchecked_failures = $previously_failed->diff($checked->keys()); // A source is failing if it failed in this run, or was previously failing and wasn't re-checked - $failing = $checked->filter(fn($passed) => ! $passed)->keys()->merge($unchecked_failures); + $failing = $checked->filter(fn ($passed) => ! $passed)->keys()->merge($unchecked_failures); // Only report failures for sources that are currently enabled $failed_sources = $failing->intersect($enabled)->sort()->values();