Process: split getMemoryUsage() into 2 functions

this isn't released yet so it's OK to change.
phpstan level 7 doesn't like these kinds of ambiguous return types because there's no way for it to tell which type is returned without a return type specifying extension, and it's easier to just change the API than to make PHPStan understand it.
This commit is contained in:
Dylan K. Taylor
2020-03-13 17:32:17 +00:00
parent 1171cd2493
commit 3907a2b6ba
7 changed files with 15 additions and 12 deletions

View File

@@ -49,7 +49,7 @@ class StatusCommand extends VanillaCommand{
}
$rUsage = Process::getRealMemoryUsage();
$mUsage = Process::getMemoryUsage(true);
$mUsage = Process::getAdvancedMemoryUsage();
$server = $sender->getServer();
$sender->sendMessage(TextFormat::GREEN . "---- " . TextFormat::WHITE . "Server status" . TextFormat::GREEN . " ----");