mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Various issues fixed (SonarQube)
This commit is contained in:
@@ -275,7 +275,7 @@ trait RecurringTransactionTrait
|
||||
*/
|
||||
protected function updateTags(RecurrenceTransaction $transaction, array $tags): void
|
||||
{
|
||||
if (count($tags) > 0) {
|
||||
if (!empty($tags)) {
|
||||
/** @var RecurrenceMeta $entry */
|
||||
$entry = $transaction->recurrenceTransactionMeta()->where('name', 'tags')->first();
|
||||
if (null === $entry) {
|
||||
@@ -284,7 +284,7 @@ trait RecurringTransactionTrait
|
||||
$entry->value = json_encode($tags);
|
||||
$entry->save();
|
||||
}
|
||||
if (0 === count($tags)) {
|
||||
if (empty($tags)) {
|
||||
// delete if present
|
||||
$transaction->recurrenceTransactionMeta()->where('name', 'tags')->delete();
|
||||
}
|
||||
|
Reference in New Issue
Block a user