Deprecate MathUtil::getRandomValue()
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 10 Jun 2021 13:54:53 +0000 (15:54 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 10 Jun 2021 13:54:53 +0000 (15:54 +0200)
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

index 67f020dc49f82f0b9e6098259ab02e7be809514d..4a5207402b5e1a1f5dd4a4cf7f57ad5a9c10ed5e 100644 (file)
@@ -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)
     {