. */ declare(strict_types=1); namespace FireflyIII\Helpers\Report; use Carbon\Carbon; use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; /** * Interface NetWorthInterface * */ interface NetWorthInterface { /** * TODO unsure why this is deprecated. * * Returns the user's net worth in an array with the following layout: * * - * - currency: TransactionCurrency object * - date: the current date * - amount: the user's net worth in that currency. * * This repeats for each currency the user has transactions in. * Result of this method is cached. * * @param Collection $accounts * @param Carbon $date * @return array * @deprecated */ public function getNetWorthByCurrency(Collection $accounts, Carbon $date): array; /** * @param User|Authenticatable|null $user */ public function setUser(User | Authenticatable | null $user): void; /** * TODO move to repository * * Same as above but cleaner function with less dependencies. * * @param Carbon $date * * @return array */ public function sumNetWorthByCurrency(Carbon $date): array; }