Code cleanup

This commit is contained in:
James Cole
2023-11-04 14:18:49 +01:00
parent 5a35960434
commit ba0843d0bb
211 changed files with 566 additions and 568 deletions

View File

@@ -220,12 +220,12 @@ class FireflyValidator extends Validator
$last = substr($value, 4);
$iban = $last . $first;
$iban = trim(str_replace($search, $replace, $iban));
if (0 === strlen($iban)) {
if ('' === $iban) {
return false;
}
try {
$checksum = bcmod($iban, '97');
} catch (ValueError $e) { // @phpstan-ignore-line
} catch (ValueError $e) { /** @phpstan-ignore-line */
$message = sprintf('Could not validate IBAN check value "%s" (IBAN "%s")', $iban, $value);
app('log')->error($message);
app('log')->error($e->getTraceAsString());