mirror of
https://github.com/archtechx/money.git
synced 2026-05-06 12:24:03 +00:00
Laravel 12 support (#28)
* Laravel 12 support * bump larastan * phpstan fixes * remove pest() * update larastan dependency name
This commit is contained in:
parent
b642e32a4b
commit
f5011bce68
7 changed files with 14 additions and 18 deletions
|
|
@ -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.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue