Update code in includes to be PSR-2 compliant (#4220)

refactor: Update code in /includes to be psr2 compliant #4220
This commit is contained in:
Tony Murray
2016-08-28 12:32:58 -05:00
committed by Neil Lathwood
parent 3c0fcdd46b
commit 9284bc60ff
373 changed files with 3509 additions and 3498 deletions

View File

@@ -23,7 +23,7 @@ if (strstr($hardware, 'CMM') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-errorCount', $tags, $fields);
$graphs['canopy_generic_errorCount'] = TRUE;
$graphs['canopy_generic_errorCount'] = true;
unset($rrd_filename, $fecInErrorsCount, $fecOutErrorsCount);
}
@@ -35,7 +35,7 @@ if (strstr($hardware, 'CMM') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-crcErrors', $tags, $fields);
$graphs['canopy_generic_crcErrors'] = TRUE;
$graphs['canopy_generic_crcErrors'] = true;
}
$vertical = str_replace('"', "", snmp_get($device, ".1.3.6.1.4.1.161.19.3.2.2.117.0", "-Ovqn", ""));
@@ -54,7 +54,7 @@ if (strstr($hardware, 'CMM') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-signalHV', $tags, $fields);
$graphs['canopy_generic_signalHV'] = TRUE;
$graphs['canopy_generic_signalHV'] = true;
unset($rrd_filename, $vertical, $horizontal, $combined);
}
@@ -66,7 +66,7 @@ if (strstr($hardware, 'CMM') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-rssi', $tags, $fields);
$graphs['canopy_generic_rssi'] = TRUE;
$graphs['canopy_generic_rssi'] = true;
unset($rrd_filename, $rssi);
}
@@ -78,7 +78,7 @@ if (strstr($hardware, 'CMM') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-jitter', $tags, $fields);
$graphs['canopy_generic_jitter'] = TRUE;
$graphs['canopy_generic_jitter'] = true;
unset($rrd_filename, $jitter);
}
@@ -96,7 +96,7 @@ if (strstr($hardware, 'CMM') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-450-slaveHV', $tags, $fields);
$graphs['canopy_generic_450_slaveHV'] = TRUE;
$graphs['canopy_generic_450_slaveHV'] = true;
unset($rrd_filename, $horizontal, $vertical);
}
@@ -108,7 +108,7 @@ if (strstr($hardware, 'CMM') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-450-slaveSSR', $tags, $fields);
$graphs['canopy_generic_450_slaveSSR'] = TRUE;
$graphs['canopy_generic_450_slaveSSR'] = true;
unset($rrd_filename, $ssr);
}
@@ -125,7 +125,7 @@ if (strstr($hardware, 'CMM') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-450-slaveSNR', $tags, $fields);
$graphs['canopy_generic_450_slaveSNR'] = TRUE;
$graphs['canopy_generic_450_slaveSNR'] = true;
unset($rrd_filename, $horizontal, $vertical);
}
}
@@ -134,9 +134,9 @@ if (strstr($hardware, 'AP') || strstr($hardware, 'Master') || strstr($hardware,
$gpsStatus = snmp_get($device, "whispGPSStats.0", "-Ovqn", "WHISP-APS-MIB");
if ($gpsStatus == 'generatingSync') {
$gpsStatus = 3;
} else if ($gpsStatus == 'gpsLostSync') {
} elseif ($gpsStatus == 'gpsLostSync') {
$gpsStatus = 2;
} else if ($gpsStatus == 'gpsSynchronized') {
} elseif ($gpsStatus == 'gpsSynchronized') {
$gpsStatus = 1;
}
if (is_numeric($gpsStatus)) {
@@ -146,7 +146,7 @@ if (strstr($hardware, 'AP') || strstr($hardware, 'Master') || strstr($hardware,
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-whispGPSStats', $tags, $fields);
$graphs['canopy_generic_whispGPSStats'] = TRUE;
$graphs['canopy_generic_whispGPSStats'] = true;
unset($rrd_filename, $gpsStatus);
}
@@ -163,7 +163,7 @@ if (strstr($hardware, 'AP') || strstr($hardware, 'Master') || strstr($hardware,
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-gpsStats', $tags, $fields);
$graphs['canopy_generic_gpsStats'] = TRUE;
$graphs['canopy_generic_gpsStats'] = true;
unset($rrd_filename, $visible, $tracked);
}
}
@@ -182,7 +182,7 @@ if (strstr($version, 'AP') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-450-linkRadioDbm', $tags, $fields);
$graphs['canopy_generic_450_linkRadioDbm'] = TRUE;
$graphs['canopy_generic_450_linkRadioDbm'] = true;
unset($rrd_filename, $horizontal, $horizontal);
}
@@ -194,7 +194,7 @@ if (strstr($version, 'AP') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-450-powerlevel', $tags, $fields);
$graphs['canopy_generic_450_powerlevel'] = TRUE;
$graphs['canopy_generic_450_powerlevel'] = true;
unset($lastLevel);
}
@@ -211,7 +211,7 @@ if (strstr($version, 'AP') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-450-ptpSNR', $tags, $fields);
$graphs['canopy_generic_450_ptpSNR'] = TRUE;
$graphs['canopy_generic_450_ptpSNR'] = true;
unset($rrd_filename, $horizontal, $horizontal);
}
@@ -223,7 +223,7 @@ if (strstr($version, 'AP') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-450-masterSSR', $tags, $fields);
$graphs['canopy_generic_450_masterSSR'] = TRUE;
$graphs['canopy_generic_450_masterSSR'] = true;
unset($rrd_filename, $ssr);
}
@@ -249,7 +249,7 @@ if (strstr($version, 'AP') == false) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-radioDbm', $tags, $fields);
$graphs['canopy_generic_radioDbm'] = TRUE;
$graphs['canopy_generic_radioDbm'] = true;
unset($rrd_filename, $dbmRadio, $minRadio, $maxRadio, $avgRadio);
}
}
@@ -270,7 +270,7 @@ if (strstr($version, 'AP')) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-regCount', $tags, $fields);
$graphs['canopy_generic_regCount'] = TRUE;
$graphs['canopy_generic_regCount'] = true;
unset($rrd_filename, $registered, $failed);
}
@@ -287,7 +287,7 @@ if (strstr($version, 'AP')) {
);
$tags = compact('rrd_def');
data_update($device, 'canopy-generic-freq', $tags, $fields);
$graphs['canopy_generic_freq'] = TRUE;
$graphs['canopy_generic_freq'] = true;
unset($rrd_filename, $freq);
}
}
}