Skip to content

Commit 3277e54

Browse files
committed
simplify pdf formatPercentage
1 parent e35394c commit 3277e54

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Concerns/FormatForPdf.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ public function formatPercentage(null|float|int $percentage, ?string $locale = n
2121
return null;
2222
}
2323

24-
$percentage = ($percentage > 1) ? ($percentage / 100) : $percentage;
25-
2624
$formatter = new NumberFormatter($locale ?? App::getLocale(), NumberFormatter::PERCENT);
2725

28-
return $formatter->format($percentage);
26+
return $formatter->format($percentage / 100);
2927
}
3028
}

0 commit comments

Comments
 (0)