mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 14:41:20 +00:00
Remove unnecessary backslash
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user