. */ declare(strict_types=1); namespace FireflyIII\Repositories\UserGroups\Account; use FireflyIII\Models\Account; use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\UserGroup; use FireflyIII\User; use Illuminate\Support\Collection; /** * Interface AccountRepositoryInterface */ interface AccountRepositoryInterface { public function countAccounts(array $types): int; public function find(int $accountId): ?Account; public function findByAccountNumber(string $number, array $types): ?Account; public function findByIbanNull(string $iban, array $types): ?Account; public function findByName(string $name, array $types): ?Account; public function getAccountCurrency(Account $account): ?TransactionCurrency; public function getAccountsById(array $accountIds): Collection; public function getAccountsByType(array $types, ?array $sort = []): Collection; /** * Used in the infinite accounts list. */ public function getAccountsInOrder(array $types, array $sort, int $startRow, int $endRow): Collection; public function getActiveAccountsByType(array $types): Collection; /** * Return meta value for account. Null if not found. */ public function getMetaValue(Account $account, string $field): ?string; /** * Reset order types of the mentioned accounts. */ public function resetAccountOrder(): void; public function searchAccount(string $query, array $types, int $limit): Collection; public function setUser(User $user): void; public function setUserGroup(UserGroup $userGroup): void; public function update(Account $account, array $data): Account; }