← All changes
|
libraries/vendor/PhpSpreadsheet/Cell/AdvancedValueBinder.php
+1
-1
3.3.1
→
3.4
View file →
| @@ -59,9 +59,9 @@ | ||
| 59 | 59 | |
| 60 | 60 | // Check for currency |
| 61 | 61 | if (preg_match(FormattedNumber::currencyMatcherRegexp(), (string) preg_replace('/(\d)' . $thousandsSeparator . '(\d)/u', '$1$2', $value), $matches, PREG_UNMATCHED_AS_NULL)) { |
| 62 | 62 | // Convert value to number |
| 63 | - $sign = ($matches['PrefixedSign'] ?? $matches['PrefixedSign2'] ?? $matches['PostfixedSign']) ?? null; | |
| 63 | + $sign = ($matches['PrefixedSign'] ?? $matches['PrefixedSign2'] ?? $matches['PostfixedSign']) ?? null; //* @phpstan-ignore nullCoalesce.unnecessary (Not sure whether Phpstan is correct) | |
| 64 | 64 | $currencyCode = $matches['PrefixedCurrency'] ?? $matches['PostfixedCurrency'] ?? ''; |
| 65 | 65 | /** @var string */ |
| 66 | 66 | $temp = str_replace([$decimalSeparatorNoPreg, $currencyCode, ' ', '-'], ['.', '', '', ''], (string) preg_replace('/(\d)' . $thousandsSeparator . '(\d)/u', '$1$2', $value)); |
| 67 | 67 | $value = (float) ($sign . trim($temp)); |