mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Import statements and update configuration.
This commit is contained in:
@@ -45,6 +45,8 @@ use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException;
|
||||
use PragmaRX\Google2FA\Exceptions\InvalidCharactersException;
|
||||
use PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException;
|
||||
use PragmaRX\Google2FALaravel\Facade;
|
||||
use Config;
|
||||
use ValueError;
|
||||
|
||||
/**
|
||||
* Class FireflyValidator.
|
||||
@@ -216,7 +218,7 @@ class FireflyValidator extends Validator
|
||||
|
||||
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);
|
||||
Log::error($message);
|
||||
Log::error($e->getTraceAsString());
|
||||
@@ -537,7 +539,7 @@ class FireflyValidator extends Validator
|
||||
private function validateByAccountTypeString(string $value, array $parameters, string $type): bool
|
||||
{
|
||||
/** @var null|array $search */
|
||||
$search = \Config::get('firefly.accountTypeByIdentifier.'.$type);
|
||||
$search = Config::get('firefly.accountTypeByIdentifier.'.$type);
|
||||
|
||||
if (null === $search) {
|
||||
return false;
|
||||
|
@@ -28,6 +28,7 @@ use Carbon\Carbon;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Models\RecurrenceTransaction;
|
||||
use Illuminate\Validation\Validator;
|
||||
use InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Trait RecurrenceValidation
|
||||
@@ -294,7 +295,7 @@ trait RecurrenceValidation
|
||||
{
|
||||
try {
|
||||
Carbon::createFromFormat('Y-m-d', $moment);
|
||||
} catch (\InvalidArgumentException $e) { // @phpstan-ignore-line
|
||||
} catch (InvalidArgumentException $e) { // @phpstan-ignore-line
|
||||
app('log')->debug(sprintf('Invalid argument for Carbon: %s', $e->getMessage()));
|
||||
$validator->errors()->add(sprintf('repetitions.%d.moment', $index), (string) trans('validation.valid_recurrence_rep_moment'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user