1
0
Fork 0
mirror of https://github.com/archtechx/money.git synced 2025-12-12 19:34:02 +00:00

phpstan fixes

This commit is contained in:
Samuel Štancl 2025-03-11 17:26:54 +01:00
parent 1ee60cb22d
commit e30211058a
2 changed files with 2 additions and 1 deletions

View file

@ -23,3 +23,4 @@ parameters:
paths:
- src/Currency.php
- identifier: missingType.iterableValue
- identifier: unset.possiblyHookedProperty

View file

@ -44,7 +44,7 @@ class PriceFormatter
$formatted = ltrim($formatted, $currency->prefix());
$formatted = rtrim($formatted, $currency->suffix());
$removeNonDigits = preg_replace('/[^\d' . preg_quote($currency->decimalSeparator()) . ']/', '', $formatted);
$removeNonDigits = preg_replace('/[^\d' . preg_quote($currency->decimalSeparator(), '/') . ']/', '', $formatted);
if (! is_string($removeNonDigits)) {
throw new Exception('The formatted string could not be resolved to a valid number.');