Apply fixes from StyleCI (#12117)

* Apply fixes from StyleCI

* Disable style check
This commit is contained in:
Jellyfrog
2020-09-21 14:54:51 +02:00
committed by GitHub
parent 8ec9183df5
commit 77c531527c
752 changed files with 6238 additions and 5833 deletions

View File

@@ -26,7 +26,7 @@
use LibreNMS\Config;
$init_modules = array();
$init_modules = [];
require realpath(__DIR__ . '/..') . '/includes/init.php';
$options = getopt('h:');
@@ -43,7 +43,7 @@ if (empty($hostname)) {
}
if ($hostname !== 'all') {
$hostname = !ctype_digit($hostname) ? $hostname : gethostbyid($hostname);
$hostname = ! ctype_digit($hostname) ? $hostname : gethostbyid($hostname);
}
if (empty($hostname)) {
@@ -51,11 +51,11 @@ if (empty($hostname)) {
exit;
}
$system_step = Config::get('rrd.step', 300);
$icmp_step = Config::get('ping_rrd_step', $system_step);
$system_step = Config::get('rrd.step', 300);
$icmp_step = Config::get('ping_rrd_step', $system_step);
$system_heartbeat = Config::get('rrd.heartbeat', $system_step * 2);
$rrdtool = Config::get('rrdtool', 'rrdtool');
$tmp_path = Config::get('temp_dir', '/tmp');
$rrdtool = Config::get('rrdtool', 'rrdtool');
$tmp_path = Config::get('temp_dir', '/tmp');
if ($hostname === 'all') {
$hostname = '*';
@@ -67,7 +67,7 @@ $skipped = 0;
$failed = 0;
foreach ($files as $file) {
$random = $tmp_path.'/'.mt_rand() . '.xml';
$random = $tmp_path . '/' . mt_rand() . '.xml';
$rrd_file = basename($file, '.rrd');
if ($rrd_file == 'ping-perf') {