mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-05 05:33:36 +00:00
Various code cleanup.
This commit is contained in:
@@ -136,11 +136,11 @@ trait RecurringTransactionTrait
|
||||
$validator->setUser($recurrence->user);
|
||||
$validator->setTransactionType($recurrence->transactionType->type);
|
||||
if (!$validator->validateSource($source->id, null, null)) {
|
||||
throw new FireflyException(sprintf('Source invalid: %s', $validator->sourceError)); // @codeCoverageIgnore
|
||||
throw new FireflyException(sprintf('Source invalid: %s', $validator->sourceError));
|
||||
}
|
||||
|
||||
if (!$validator->validateDestination($destination->id, null, null)) {
|
||||
throw new FireflyException(sprintf('Destination invalid: %s', $validator->destError)); // @codeCoverageIgnore
|
||||
throw new FireflyException(sprintf('Destination invalid: %s', $validator->destError));
|
||||
}
|
||||
if (array_key_exists('foreign_amount', $array) && '' === (string)$array['foreign_amount']) {
|
||||
unset($array['foreign_amount']);
|
||||
@@ -220,11 +220,11 @@ trait RecurringTransactionTrait
|
||||
if (!in_array($expectedType, $cannotCreate, true)) {
|
||||
try {
|
||||
$result = $factory->findOrCreate($accountName, $expectedType);
|
||||
// @codeCoverageIgnoreStart
|
||||
|
||||
} catch (FireflyException $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user