mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-15 04:10:51 +08:00
fix: resolve PHPStan static analysis warnings
This commit is contained in:
@@ -25,8 +25,7 @@ class StatController extends Controller
|
||||
{
|
||||
// 获取在线节点数
|
||||
$onlineNodes = Server::all()->filter(function ($server) {
|
||||
$server->loadServerStatus();
|
||||
return $server->is_online;
|
||||
return !!$server->is_online;
|
||||
})->count();
|
||||
// 获取在线设备数和在线用户数
|
||||
$onlineDevices = User::where('t', '>=', time() - 600)
|
||||
@@ -268,8 +267,7 @@ class StatController extends Controller
|
||||
|
||||
// 获取在线节点数
|
||||
$onlineNodes = Server::all()->filter(function ($server) {
|
||||
$server->loadServerStatus();
|
||||
return $server->is_online;
|
||||
return !!$server->is_online;
|
||||
})->count();
|
||||
|
||||
// 获取在线设备数和在线用户数
|
||||
|
||||
Reference in New Issue
Block a user