. */ declare(strict_types=1); namespace FireflyIII\Repositories\Account; use Carbon\Carbon; use FireflyIII\User; use Illuminate\Support\Collection; /** * Interface OperationsRepositoryInterface */ interface OperationsRepositoryInterface { /** * This method returns a list of all the withdrawal transaction journals (as arrays) set in that period * which have the specified accounts. It's grouped per currency, with as few details in the array * as possible. Amounts are always negative. * * @param Carbon $start * @param Carbon $end * @param Collection $accounts * * @return array */ public function listExpenses(Carbon $start, Carbon $end, Collection $accounts): array; /** * This method returns a list of all the deposit transaction journals (as arrays) set in that period * which have the specified accounts. It's grouped per currency, with as few details in the array * as possible. Amounts are always positive. * * @param Carbon $start * @param Carbon $end * @param Collection|null $accounts * * @return array */ public function listIncome(Carbon $start, Carbon $end, ?Collection $accounts = null): array; /** * @param User $user */ public function setUser(User $user): void; /** * Sum of withdrawal journals in period for a set of accounts, grouped per currency. Amounts are always negative. * * @param Carbon $start * @param Carbon $end * @param Collection|null $accounts * * @return array */ public function sumExpenses(Carbon $start, Carbon $end, ?Collection $accounts = null): array; /** * Sum of income journals in period for a set of accounts, grouped per currency. Amounts are always positive. * * @param Carbon $start * @param Carbon $end * @param Collection|null $accounts * * @return array */ public function sumIncome(Carbon $start, Carbon $end, ?Collection $accounts = null): array; }