]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Widget/TagCloud.php
Merge pull request #11265 from k-alin/6606-k-alin-mysql-unix-socket
[friendica.git] / src / Content / Widget / TagCloud.php
index f315b3b5373579f4d53ee55c20b5c117911b0728..6eac362b4b35793f24ea60bb88325e1758441602 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -127,8 +127,8 @@ class TagCloud
        private static function tagCalc(array $arr)
        {
                $tags = [];
-               $min = 1e9;
-               $max = -1e9;
+               $min = 1000000000.0;
+               $max = -1000000000.0;
                $x = 0;
 
                if (!$arr) {
@@ -145,7 +145,7 @@ class TagCloud
                }
 
                usort($tags, 'self::tagsSort');
-               $range = max(.01, $max - $min) * 1.0001;
+               $range = max(0.01, $max - $min) * 1.0001;
 
                for ($x = 0; $x < count($tags); $x ++) {
                        $tags[$x][2] = 1 + floor(9 * ($tags[$x][1] - $min) / $range);