mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Apply fixes from StyleCI (#12124)
This commit is contained in:
@@ -34,14 +34,14 @@ class ThreeCom extends OS implements OSDiscovery
|
||||
public function discoverOS(Device $device): void
|
||||
{
|
||||
if (Str::contains($device->sysDescr, 'Software')) {
|
||||
$device->hardware = str_replace("3Com ", '', substr($device->sysDescr, 0, strpos($device->sysDescr, 'Software')));
|
||||
$device->hardware = str_replace('3Com ', '', substr($device->sysDescr, 0, strpos($device->sysDescr, 'Software')));
|
||||
// Version is the last word in the sysDescr's first line
|
||||
[$device->version] = explode("\n", substr($device->sysDescr, (strpos($device->sysDescr, 'Version') + 8)));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$device->hardware = str_replace("3Com ", '', $device->sysDescr);
|
||||
$device->hardware = str_replace('3Com ', '', $device->sysDescr);
|
||||
// Old Stack Units
|
||||
if (Str::startsWith($device->sysObjectID, '.1.3.6.1.4.1.43.10.27.4.1.')) {
|
||||
$oids = ['stackUnitDesc.1', 'stackUnitPromVersion.1', 'stackUnitSWVersion.1', 'stackUnitSerialNumber.1', 'stackUnitCapabilities.1'];
|
||||
|
Reference in New Issue
Block a user