Skip to content

Commit 2a45b54

Browse files
committed
PHP 8.2: Fix deprecated string interpolation
1 parent 75df816 commit 2a45b54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Byte/ByteFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function format(int|float $bytes, int $precision = null): string
7272
*/
7373
private function formatValue(float $value, int $precision): string
7474
{
75-
$formatted = sprintf("%0.${precision}F", $value);
75+
$formatted = sprintf("%0.{$precision}F", $value);
7676

7777
if ($this->hasAutomaticPrecision()) {
7878
// [0 => integer part, 1 => fractional part].

0 commit comments

Comments
 (0)