mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Code cleanup.
This commit is contained in:
@@ -33,13 +33,11 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
{
|
||||
use UserGroupTrait;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function searchJournalDescriptions(string $search, int $limit): Collection
|
||||
{
|
||||
$query = $this->userGroup->transactionJournals()
|
||||
->orderBy('date', 'DESC');
|
||||
->orderBy('date', 'DESC')
|
||||
;
|
||||
if ('' !== $search) {
|
||||
$query->where('description', 'LIKE', sprintf('%%%s%%', $search));
|
||||
}
|
||||
|
@@ -33,18 +33,8 @@ interface JournalRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Search in journal descriptions.
|
||||
*
|
||||
* @param string $search
|
||||
* @param int $limit
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function searchJournalDescriptions(string $search, int $limit): Collection;
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUser(User $user): void;
|
||||
}
|
||||
|
Reference in New Issue
Block a user