Skip to content

Commit b3789fa

Browse files
committed
Condition can be replaced with 'min()'/'max()' call
1 parent af61ffd commit b3789fa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

class/TagHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,9 @@ public function getTagData($tags_array, $font_max = 0, $font_min = 0)
526526
// set min and max tag count
527527
$count_array = \array_column($tags_array, 'count', 'id');
528528
$count_min = \count($count_array) > 0 ? \min($count_array) : 0;
529-
$count_min = $count_min > 0 ? $count_min : 0;
529+
$count_min = max($count_min, 0);
530530
$count_max = \count($count_array) > 0 ? \max($count_array) : 0;
531-
$count_max = $count_max > 0 ? $count_max : 0;
531+
$count_max = max($count_max, 0);
532532
if ($count_max > 0) {
533533
$term_array = \array_column($tags_array, 'term', 'id');
534534
$tags_term_array = \array_map('\mb_strtolower', $term_array);

0 commit comments

Comments
 (0)