Skip to content

Commit

Permalink
Fix of padding digit match
Browse files Browse the repository at this point in the history
  • Loading branch information
SenseException committed Dec 5, 2023
1 parent b47b395 commit 4021756
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Formatter/PrecisionNumberFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function formatValue(string $typeSpecifier, mixed $value): string

$paddingChar = ' ';
$paddingDigits = $matches[1];
if (is_numeric($paddingDigits) && preg_match('/0[0-9]+/', $paddingDigits) !== false) {
if (is_numeric($paddingDigits) && preg_match('/0[0-9]+/', $paddingDigits) === 1) {
$paddingChar = $paddingDigits[0];
}

Expand Down

0 comments on commit 4021756

Please sign in to comment.