Skip to content

Commit

Permalink
make PHCS happy
Browse files Browse the repository at this point in the history
  • Loading branch information
zaepho committed Nov 4, 2024
1 parent 9606ef0 commit 8fd7332
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions UniFi/UniFi.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ public function livestats()
// TODO: Update UI to adapt to lack of Switches
$data['lan_users'] = isset($detail->num_user) ? $detail->num_user : 0;
$data['num_sw'] = isset($detail->num_sw) ? $detail->num_sw : 0;

}

if ($detail->subsystem === 'wan') {
// Handle lack of GW
// TODO: Update UI to adapt to lack of GW
$data['wan_avail'] = isset($detail->uptime_stats->WAN->availability) ? number_format($detail->uptime_stats->WAN->availability, 0) : 0;
$data['wan_avail'] = isset($detail->uptime_stats->WAN->availability)
? number_format($detail->uptime_stats->WAN->availability, 0)
: 0;
$data['num_gw'] = isset($detail->num_gw) ? $detail->num_gw : 0;
}
}
Expand Down

0 comments on commit 8fd7332

Please sign in to comment.