Apply "Squiz" code style on old (pre-2014) files

This commit is contained in:
Job Snijders
2015-07-11 16:12:35 +02:00
parent e4f4eb44dc
commit ebd0f6fc35
539 changed files with 13587 additions and 13219 deletions
+4 -7
View File
@@ -1,11 +1,8 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/ucd_cpu.rrd"))
{
$graph_title = "Processor Utilisation";
$graph_type = "device_cpu";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/ucd_cpu.rrd')) {
$graph_title = 'Processor Utilisation';
$graph_type = 'device_cpu';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
@@ -1,11 +1,8 @@
<?php
if ($device['os'] == "fortigate" || $device['os_group'] == "fortigate")
{
$graph_title = "Firewall Sessions";
$graph_type = "fortigate_sessions";
if ($device['os'] == 'fortigate' || $device['os_group'] == 'fortigate') {
$graph_title = 'Firewall Sessions';
$graph_type = 'fortigate_sessions';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
+4 -7
View File
@@ -1,11 +1,8 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/hrSystem.rrd"))
{
$graph_title = "Running Processes";
$graph_type = "device_hrprocesses";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/hrSystem.rrd')) {
$graph_title = 'Running Processes';
$graph_type = 'device_hrprocesses';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
+4 -7
View File
@@ -1,11 +1,8 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/hrSystem.rrd"))
{
$graph_title = "Users Logged On";
$graph_type = "device_hrusers";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/hrSystem.rrd')) {
$graph_title = 'Users Logged On';
$graph_type = 'device_hrusers';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
+11 -15
View File
@@ -1,24 +1,20 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/ipSystemStats-ipv6.rrd"))
{
$graph_title = "IPv6 IP Packet Statistics";
$graph_type = "device_ipSystemStats_v6";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/ipSystemStats-ipv6.rrd')) {
$graph_title = 'IPv6 IP Packet Statistics';
$graph_type = 'device_ipSystemStats_v6';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
$graph_title = "IPv6 IP Fragmentation Statistics";
$graph_type = "device_ipSystemStats_v6_frag";
$graph_title = 'IPv6 IP Fragmentation Statistics';
$graph_type = 'device_ipSystemStats_v6_frag';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/ipSystemStats-ipv4.rrd"))
{
$graph_title = "IPv4 IP Packet Statistics";
$graph_type = "device_ipSystemStats_v4";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/ipSystemStats-ipv4.rrd')) {
$graph_title = 'IPv4 IP Packet Statistics';
$graph_type = 'device_ipSystemStats_v4';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
+4 -7
View File
@@ -1,11 +1,8 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/ucd_mem.rrd"))
{
$graph_title = "Memory Utilisation";
$graph_type = "device_memory";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/ucd_mem.rrd')) {
$graph_title = 'Memory Utilisation';
$graph_type = 'device_memory';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
+40 -49
View File
@@ -1,79 +1,70 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/ipSystemStats-ipv6.rrd"))
{
$graph_title = "IPv6 IP Packet Statistics";
$graph_type = "device_ipSystemStats_v6";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/ipSystemStats-ipv6.rrd')) {
$graph_title = 'IPv6 IP Packet Statistics';
$graph_type = 'device_ipSystemStats_v6';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
$graph_title = "IPv6 IP Fragmentation Statistics";
$graph_type = "device_ipSystemStats_v6_frag";
$graph_title = 'IPv6 IP Fragmentation Statistics';
$graph_type = 'device_ipSystemStats_v6_frag';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/ipSystemStats-ipv4.rrd"))
{
$graph_title = "IPv4 IP Packet Statistics";
$graph_type = "device_ipSystemStats_v4";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/ipSystemStats-ipv4.rrd')) {
$graph_title = 'IPv4 IP Packet Statistics';
$graph_type = 'device_ipSystemStats_v4';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-ip.rrd"))
{
$graph_title = "IP Statistics";
$graph_type = "device_ip";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-ip.rrd')) {
$graph_title = 'IP Statistics';
$graph_type = 'device_ip';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
$graph_title = "IP Fragmented Statistics";
$graph_type = "device_ip_fragmented";
$graph_title = 'IP Fragmented Statistics';
$graph_type = 'device_ip_fragmented';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-tcp.rrd"))
{
$graph_title = "TCP Statistics";
$graph_type = "device_tcp";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-tcp.rrd')) {
$graph_title = 'TCP Statistics';
$graph_type = 'device_tcp';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-udp.rrd"))
{
$graph_title = "UDP Statistics";
$graph_type = "device_udp";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-udp.rrd')) {
$graph_title = 'UDP Statistics';
$graph_type = 'device_udp';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-snmp.rrd"))
{
$graph_title = "SNMP Packets Statistics";
$graph_type = "device_snmp_packets";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-snmp.rrd')) {
$graph_title = 'SNMP Packets Statistics';
$graph_type = 'device_snmp_packets';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
$graph_title = "SNMP Message Type Statistics";
$graph_type = "device_snmp_statistics";
$graph_title = 'SNMP Message Type Statistics';
$graph_type = 'device_snmp_statistics';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-icmp.rrd"))
{
$graph_title = "ICMP Statistics";
$graph_type = "device_icmp";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-icmp.rrd')) {
$graph_title = 'ICMP Statistics';
$graph_type = 'device_icmp';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
$graph_title = "ICMP Informational Statistics";
$graph_type = "device_icmp_informational";
$graph_title = 'ICMP Informational Statistics';
$graph_type = 'device_icmp_informational';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
@@ -1,11 +1,8 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-icmp.rrd"))
{
$graph_title = "ICMP Informational Statistics";
$graph_type = "device_icmp_informational";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-icmp.rrd')) {
$graph_title = 'ICMP Informational Statistics';
$graph_type = 'device_icmp_informational';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
@@ -1,11 +1,8 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-icmp.rrd"))
{
$graph_title = "ICMP Statistics";
$graph_type = "device_icmp";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-icmp.rrd')) {
$graph_title = 'ICMP Statistics';
$graph_type = 'device_icmp';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
+7 -10
View File
@@ -1,16 +1,13 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-ip.rrd"))
{
$graph_title = "IP Statistics";
$graph_type = "device_ip";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-ip.rrd')) {
$graph_title = 'IP Statistics';
$graph_type = 'device_ip';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
$graph_title = "IP Fragmented Statistics";
$graph_type = "device_ip_fragmented";
$graph_title = 'IP Fragmented Statistics';
$graph_type = 'device_ip_fragmented';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
+7 -10
View File
@@ -1,16 +1,13 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-snmp.rrd"))
{
$graph_title = "SNMP Packets Statistics";
$graph_type = "device_snmp_packets";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-snmp.rrd')) {
$graph_title = 'SNMP Packets Statistics';
$graph_type = 'device_snmp_packets';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
$graph_title = "SNMP Message Type Statistics";
$graph_type = "device_snmp_statistics";
$graph_title = 'SNMP Message Type Statistics';
$graph_type = 'device_snmp_statistics';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
@@ -1,11 +1,8 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-tcp.rrd"))
{
$graph_title = "TCP Statistics";
$graph_type = "device_tcp";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-tcp.rrd')) {
$graph_title = 'TCP Statistics';
$graph_type = 'device_tcp';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
@@ -1,11 +1,8 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/netstats-udp.rrd"))
{
$graph_title = "UDP Statistics";
$graph_type = "device_udp";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/netstats-udp.rrd')) {
$graph_title = 'UDP Statistics';
$graph_type = 'device_udp';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
@@ -1,11 +1,8 @@
<?php
if ($device['os'] == "netscreen" || $device['os_group'] == "netscreen")
{
$graph_title = "Firewall Sessions";
$graph_type = "netscreen_sessions";
if ($device['os'] == 'netscreen' || $device['os_group'] == 'netscreen') {
$graph_title = 'Firewall Sessions';
$graph_type = 'netscreen_sessions';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
+4 -7
View File
@@ -1,11 +1,8 @@
<?php
if ($device['os'] == "screenos" && is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/screenos-sessions.rrd"))
{
$graph_title = "Firewall Sessions";
$graph_type = "screenos_sessions";
if ($device['os'] == 'screenos' && is_file($config['rrd_dir'].'/'.$device['hostname'].'/screenos-sessions.rrd')) {
$graph_title = 'Firewall Sessions';
$graph_type = 'screenos_sessions';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>
+3 -5
View File
@@ -1,8 +1,6 @@
<?php
$graph_title = "Device Uptime";
$graph_type = "device_uptime";
$graph_title = 'Device Uptime';
$graph_type = 'device_uptime';
include("includes/print-device-graph.php");
?>
require 'includes/print-device-graph.php';
+4 -7
View File
@@ -1,11 +1,8 @@
<?php
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] ."/wificlients-radio1.rrd"))
{
$graph_title = "Wireless clients";
$graph_type = "device_wificlients";
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/wificlients-radio1.rrd')) {
$graph_title = 'Wireless clients';
$graph_type = 'device_wificlients';
include("includes/print-device-graph.php");
include 'includes/print-device-graph.php';
}
?>