mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
StatusCommand: avoid modulo operator on float
this was detected by a custom PHPStan extension.
This commit is contained in:
parent
114df07622
commit
0ff0b33047
@ -54,9 +54,9 @@ class StatusCommand extends VanillaCommand{
|
||||
$server = $sender->getServer();
|
||||
$sender->sendMessage(TextFormat::GREEN . "---- " . TextFormat::WHITE . "Server status" . TextFormat::GREEN . " ----");
|
||||
|
||||
$time = microtime(true) - \pocketmine\START_TIME;
|
||||
$time = (int) (microtime(true) - \pocketmine\START_TIME);
|
||||
|
||||
$seconds = floor($time % 60);
|
||||
$seconds = $time % 60;
|
||||
$minutes = null;
|
||||
$hours = null;
|
||||
$days = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user