mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 06:31:22 +00:00
Fix account controller + coverage.
This commit is contained in:
@@ -87,6 +87,16 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
*
|
||||
* @return Note|null
|
||||
*/
|
||||
public function getNote(Account $account): ?Note
|
||||
{
|
||||
return $account->notes()->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the date of the very last transaction in this account.
|
||||
*
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace FireflyIII\Repositories\Account;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Note;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
@@ -33,6 +34,12 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
interface AccountRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* @param Account $account
|
||||
*
|
||||
* @return Note|null
|
||||
*/
|
||||
public function getNote(Account $account): ?Note;
|
||||
/**
|
||||
* Moved here from account CRUD.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user