mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Add more IBAN filters
This commit is contained in:
@@ -27,6 +27,7 @@ use Carbon\Carbon;
|
||||
use Carbon\Exceptions\InvalidDateException;
|
||||
use Carbon\Exceptions\InvalidFormatException;
|
||||
use FireflyIII\Repositories\UserGroups\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Support\Facades\Steam;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
@@ -114,6 +115,11 @@ trait ConvertsDataTypes
|
||||
return (string)$this->clearString((string)$entry);
|
||||
}
|
||||
|
||||
public function convertIban(string $field): string
|
||||
{
|
||||
return Steam::filterSpaces($this->convertString($field));
|
||||
}
|
||||
|
||||
public function clearString(?string $string): ?string
|
||||
{
|
||||
$string = $this->clearStringKeepNewlines($string);
|
||||
@@ -131,6 +137,12 @@ trait ConvertsDataTypes
|
||||
return trim($string);
|
||||
}
|
||||
|
||||
public function clearIban(?string $string): ?string
|
||||
{
|
||||
$string = $this->clearString($string);
|
||||
return Steam::filterSpaces($string);
|
||||
}
|
||||
|
||||
public function clearStringKeepNewlines(?string $string): ?string
|
||||
{
|
||||
if (null === $string) {
|
||||
|
Reference in New Issue
Block a user