Remove unnecessary backslash

This commit is contained in:
James Cole
2019-06-07 17:58:11 +02:00
parent e4a9abc315
commit fba3cb6d90
20 changed files with 32 additions and 32 deletions

View File

@@ -110,7 +110,7 @@ class Amount implements ConverterInterface
*/
private function alternativeDecimalSign(string $value): bool
{
$length = \strlen($value);
$length = strlen($value);
$altPosition = $length - 2;
return $length > 1 && ('.' === $value[$altPosition] || ',' === $value[$altPosition]);
@@ -125,7 +125,7 @@ class Amount implements ConverterInterface
*/
private function decimalIsComma(string $value): bool
{
$length = \strlen($value);
$length = strlen($value);
$decimalPosition = $length - 3;
return $length > 2 && ',' === $value[$decimalPosition];
@@ -140,7 +140,7 @@ class Amount implements ConverterInterface
*/
private function decimalIsDot(string $value): bool
{
$length = \strlen($value);
$length = strlen($value);
$decimalPosition = $length - 3;
return ($length > 2 && '.' === $value[$decimalPosition]) || ($length > 2 && strpos($value, '.') > $decimalPosition);
@@ -177,7 +177,7 @@ class Amount implements ConverterInterface
*/
private function getAlternativeDecimalSign(string $value): string
{
$length = \strlen($value);
$length = strlen($value);
$altPosition = $length - 2;
return $value[$altPosition];
@@ -222,7 +222,7 @@ class Amount implements ConverterInterface
// 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));
$str = preg_replace('/[^\-\(\)\.\,0-9 ]/', '', $value);
$len = \strlen($str);
$len = strlen($str);
if ('(' === $str[0] && ')' === $str[$len - 1]) {
$str = '-' . substr($str, 1, $len - 2);
}

View File

@@ -97,7 +97,7 @@ class FakePrerequisites implements PrerequisitesInterface
{
$apiKey = $data['api_key'] ?? '';
$messageBag = new MessageBag();
if (32 !== \strlen($apiKey)) {
if (32 !== strlen($apiKey)) {
$messageBag->add('api_key', 'API key must be 32 chars.');
return $messageBag;
@@ -122,7 +122,7 @@ class FakePrerequisites implements PrerequisitesInterface
if (null === $apiKey->data) {
return false;
}
if (32 === \strlen((string)$apiKey->data)) {
if (32 === strlen((string)$apiKey->data)) {
return true;
}