We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75df816 commit 2a45b54Copy full SHA for 2a45b54
1 file changed
src/Byte/ByteFormatter.php
@@ -72,7 +72,7 @@ public function format(int|float $bytes, int $precision = null): string
72
*/
73
private function formatValue(float $value, int $precision): string
74
{
75
- $formatted = sprintf("%0.${precision}F", $value);
+ $formatted = sprintf("%0.{$precision}F", $value);
76
77
if ($this->hasAutomaticPrecision()) {
78
// [0 => integer part, 1 => fractional part].
0 commit comments