Apply fixes from StyleCI (#12124)

This commit is contained in:
Jellyfrog
2020-09-21 15:59:34 +02:00
committed by GitHub
parent 0d56bbd946
commit 29f45ca352
816 changed files with 5038 additions and 5038 deletions

View File

@@ -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'];