diff --git a/Utils/MbStringUtils.php b/Utils/MbStringUtils.php index 2afb813f9..9673ddf9a 100644 --- a/Utils/MbStringUtils.php +++ b/Utils/MbStringUtils.php @@ -241,12 +241,12 @@ final class MbStringUtils */ public static function mb_entropy(string $value) : float { - $entropy = 0.0; + $entropy = 0.0; $size = \mb_strlen($value); $countChars = self::mb_count_chars($value); foreach ($countChars as $v) { - $p = $v / $size; + $p = $v / $size; $entropy -= $p * \log($p) / \log(2); } diff --git a/Utils/StringUtils.php b/Utils/StringUtils.php index 1f183788f..6bdec30d2 100644 --- a/Utils/StringUtils.php +++ b/Utils/StringUtils.php @@ -173,12 +173,12 @@ final class StringUtils */ public static function entropy(string $value) : float { - $entropy = 0.0; + $entropy = 0.0; $size = \strlen($value); $countChars = \count_chars($value, 1); foreach ($countChars as $v) { - $p = $v / $size; + $p = $v / $size; $entropy -= $p * \log($p) / \log(2); }