:100644 100644 7d11831eb 000000000 M LibreNMS/Modules/LegacyModule.php :100644 100644 bd50dfb11 000000000 M LibreNMS/Polling/ConnectivityHelper.php diff --git a/LibreNMS/Modules/LegacyModule.php b/LibreNMS/Modules/LegacyModule.php index 7d11831eb30294e57683d92aed7afc469d09fec4..60e3ba848a9046d44b234431198c59a9c27f71b7 100644 --- a/LibreNMS/Modules/LegacyModule.php +++ b/LibreNMS/Modules/LegacyModule.php @@ -90,10 +90,10 @@ class LegacyModule implements Module { // all legacy modules require snmp except ipmi and unix-agent return $status->isEnabled() && match ($this->name) { - 'ipmi' => $connectivity->ipmiIsAvailable(), - 'unix-agent' => $connectivity->unixAgentIsAvailable(), - default => $connectivity->snmpIsAvailable(), - }; + 'ipmi' => $connectivity->ipmiIsAvailable(), + 'unix-agent' => $connectivity->unixAgentIsAvailable(), + default => $connectivity->snmpIsAvailable(), + }; } public function poll(OS $os, DataStorageInterface $datastore): void diff --git a/LibreNMS/Polling/ConnectivityHelper.php b/LibreNMS/Polling/ConnectivityHelper.php index bd50dfb11faa8184e505c5555b84545ae29591d7..9bafedc500de37d0b6059f70ff75420806cc4444 100644 --- a/LibreNMS/Polling/ConnectivityHelper.php +++ b/LibreNMS/Polling/ConnectivityHelper.php @@ -33,7 +33,8 @@ readonly class ConnectivityHelper { public function __construct( private Device $device, - ) {} + ) { + } public function isAvailable(): bool { @@ -62,7 +63,7 @@ readonly class ConnectivityHelper public function icmpIsAvailable(): bool { - return $this->icmpIsEnabled() && $this->isAvailable() &&! str_contains($this->device->status_reason, 'icmp'); + return $this->icmpIsEnabled() && $this->isAvailable() && ! str_contains($this->device->status_reason, 'icmp'); } public function ipmiIsEnabled(): bool