fixes - PSR-2 style

This commit is contained in:
crcro
2016-08-13 03:25:28 +03:00
parent 133a8c8768
commit 709e941c77

View File

@ -1,6 +1,5 @@
<?php
if($device['os'] == "hpblmos")
{
if($device['os'] == "hpblmos") {
$fan_state_name = 'hpblmos_fanstate';
$fan_state_descr = 'Fan ';
$fan_exists_oid = '.1.3.6.1.4.1.232.22.2.3.1.3.1.8.';
@ -11,18 +10,14 @@ if($device['os'] == "hpblmos")
$psu_exists_oid = '.1.3.6.1.4.1.232.22.2.5.1.1.1.16.';
$psu_state_oid = '.1.3.6.1.4.1.232.22.2.5.1.1.1.17.';
for($fanid = 1; $fanid < 11; $fanid++)
{
if (snmp_get($device, $fan_exists_oid.$fanid, '-Oqve') != 2)
{
for($fanid = 1; $fanid < 11; $fanid++) {
if (snmp_get($device, $fan_exists_oid.$fanid, '-Oqve') != 2) {
$state = snmp_get($device, $fan_state_oid.$fanid, '-Oqv');
$descr = $fan_state_descr.$fanid;
if (!empty($state))
{
if (!empty($state)) {
$state_index_id = create_state_index($fan_state_name);
if($state_index_id)
{
if($state_index_id) {
$states = array(
array($state_index_id, 'other', 0, 1, 3),
array($state_index_id, 'ok', 1, 2, 0),
@ -47,18 +42,14 @@ if($device['os'] == "hpblmos")
}
}
for($psuid = 1; $psuid < 7; $psuid++)
{
if (snmp_get($device, $psu_exists_oid.$psuid, '-Oqve') != 2)
{
for($psuid = 1; $psuid < 7; $psuid++) {
if (snmp_get($device, $psu_exists_oid.$psuid, '-Oqve') != 2) {
$state = snmp_get($device, $psu_state_oid.$psuid, '-Oqv');
$descr = $psu_state_descr.$psuid;
if (!empty($state))
{
if (!empty($state)) {
$state_index_id = create_state_index($psu_state_name);
if($state_index_id)
{
if($state_index_id) {
$states = array(
array($state_index_id, 'other', 0, 1, 3),
array($state_index_id, 'ok', 1, 2, 0),