mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-17 11:59:05 +00:00
Various code cleanup.
This commit is contained in:
@@ -44,6 +44,8 @@ interface AttachmentHelperInterface
|
||||
/**
|
||||
* @param Model $model
|
||||
*
|
||||
* @param array $files
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function saveAttachmentsForModel(Model $model, array $files = null): bool;
|
||||
|
||||
@@ -430,6 +430,20 @@ class JournalCollector implements JournalCollectorInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $tags
|
||||
*
|
||||
* @return JournalCollectorInterface
|
||||
*/
|
||||
public function setTags(Collection $tags): JournalCollectorInterface
|
||||
{
|
||||
$this->joinTagTables();
|
||||
$tagIds = $tags->pluck('id')->toArray();
|
||||
$this->query->whereIn('tag_transaction_journal.tag_id', $tagIds);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $types
|
||||
*
|
||||
@@ -712,18 +726,4 @@ class JournalCollector implements JournalCollectorInterface
|
||||
$this->query->leftJoin('tag_transaction_journal', 'tag_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $tags
|
||||
*
|
||||
* @return JournalCollectorInterface
|
||||
*/
|
||||
public function setTags(Collection $tags): JournalCollectorInterface
|
||||
{
|
||||
$this->joinTagTables();
|
||||
$tagIds = $tags->pluck('id')->toArray();
|
||||
$this->query->whereIn('tag_transaction_journal.tag_id', $tagIds);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user