Code cleanup that (hopefully) matches style CI

This commit is contained in:
James Cole
2020-03-17 15:03:08 +01:00
parent 24129ab69c
commit 91c067ac9f
48 changed files with 182 additions and 131 deletions

View File

@@ -26,6 +26,7 @@ use Log;
/**
* Class Amount.
*
* @deprecated
* @codeCoverageIgnore
*/
@@ -46,7 +47,7 @@ class Amount implements ConverterInterface
}
Log::debug(sprintf('Start with amount "%s"', $value));
$original = $value;
$value = $this->stripAmount((string)$value);
$value = $this->stripAmount((string) $value);
$decimal = null;
if ($this->decimalIsDot($value)) {
@@ -219,7 +220,7 @@ class Amount implements ConverterInterface
$value = substr($value, 2);
}
// have to strip the € because apparantly the Postbank (DE) thinks "1.000,00 €" is a normal way to format a number.
$value = trim((string)str_replace(['€'], '', $value));
$value = trim((string) str_replace(['€'], '', $value));
$str = preg_replace('/[^\-\(\)\.\,0-9 ]/', '', $value);
$len = strlen($str);
if ('(' === $str[0] && ')' === $str[$len - 1]) {