This commit is contained in:
James Cole
2018-06-09 05:50:31 +02:00
parent c18046c25d
commit 4a548ac282
2 changed files with 12 additions and 0 deletions

View File

@@ -109,6 +109,11 @@ class Amount implements ConverterInterface
*/
private function stripAmount(string $value): string
{
if (0 === strpos($value, '--')) {
$value = substr($value, 2);
}
$str = preg_replace('/[^\-\(\)\.\,0-9 ]/', '', $value);
$len = \strlen($str);
if ('(' === $str[0] && ')' === $str[$len - 1]) {