From f9fac32c9d5736525ee6326fa4623ddbdc541acb Mon Sep 17 00:00:00 2001 From: Matias Ahumada Date: Tue, 3 Dec 2024 15:26:18 -0300 Subject: [PATCH] changed/change-ci-version auto-commit --- src/CryptoQr.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CryptoQr.php b/src/CryptoQr.php index 1c77bff..1218706 100644 --- a/src/CryptoQr.php +++ b/src/CryptoQr.php @@ -81,9 +81,10 @@ public function getAmountString(): string $amount = $this->getAmount(); $string = (string) $amount; + /** @var array{array, $matches int, string, int} */ if (preg_match('~\.(\d+)E([+-])?(\d+)~', $string, $matches) === 1) { $decimals = $matches[2] === '-' ? strlen($matches[1]) + $matches[3] : 0; - $string = number_format($amount, $decimals, '.', ''); + $string = number_format($amount, (int) $decimals, '.', ''); } return $string;