. */ declare(strict_types=1); namespace FireflyIII\Repositories\Budget; use Carbon\Carbon; use FireflyIII\Enums\UserRoleEnum; use FireflyIII\Models\Budget; use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\UserGroup; use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; /** * Interface OperationsRepositoryInterface * * @method setUserGroup(UserGroup $group) * @method getUserGroup() * @method getUser() * @method checkUserGroupAccess(UserRoleEnum $role) * @method setUser(null|Authenticatable|User $user) * @method setUserGroupById(int $userGroupId) * */ interface OperationsRepositoryInterface { /** * A method that returns the amount of money budgeted per day for this budget, * on average. */ public function budgetedPerDay(Budget $budget): string; /** * @deprecated */ public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): array; /** * This method returns a list of all the withdrawal transaction journals (as arrays) set in that period * which have the specified budget set to them. It's grouped per currency, with as few details in the array * as possible. Amounts are always negative. */ public function listExpenses(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $budgets = null): array; /** * @SuppressWarnings("PHPMD.ExcessiveParameterList") */ public function sumExpenses( Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $budgets = null, ?TransactionCurrency $currency = null ): array; }