From 252c4e74889ed89ea13ee8bea62ecbef87b9c0b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 10 Jun 2021 15:54:53 +0200 Subject: [PATCH] Deprecate MathUtil::getRandomValue() This method is a thin wrapper around `\mt_rand()` without any usability benefits. Users of this method should either switch to `\random_int()` or `\mt_rand()` directly. --- wcfsetup/install/files/lib/util/MathUtil.class.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/util/MathUtil.class.php b/wcfsetup/install/files/lib/util/MathUtil.class.php index 67f020dc49..4a5207402b 100644 --- a/wcfsetup/install/files/lib/util/MathUtil.class.php +++ b/wcfsetup/install/files/lib/util/MathUtil.class.php @@ -13,11 +13,7 @@ namespace wcf\util; final class MathUtil { /** - * Generates a random value. - * - * @param int $min - * @param int $max - * @return int + * @deprecated 5.5 - Use `\random_int()` or `\mt_rand()` directly. */ public static function getRandomValue($min = null, $max = null) { -- 2.20.1