mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-08 21:58:03 +00:00
Mark as deprecated.
This commit is contained in:
@@ -40,6 +40,8 @@ use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
* Class AccountRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class AccountRepository implements AccountRepositoryInterface
|
||||
{
|
||||
|
@@ -27,11 +27,12 @@ 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
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface AccountRepositoryInterface
|
||||
{
|
||||
@@ -82,9 +83,5 @@ interface AccountRepositoryInterface
|
||||
|
||||
public function searchAccount(string $query, array $types, int $page, int $limit): Collection;
|
||||
|
||||
public function setUser(User $user): void;
|
||||
|
||||
public function setUserGroup(UserGroup $userGroup): void;
|
||||
|
||||
public function update(Account $account, array $data): Account;
|
||||
}
|
||||
|
@@ -36,6 +36,8 @@ use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class BillRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class BillRepository implements BillRepositoryInterface
|
||||
{
|
||||
|
@@ -26,11 +26,12 @@ namespace FireflyIII\Repositories\UserGroups\Bill;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface BillRepositoryInterface
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface BillRepositoryInterface
|
||||
{
|
||||
@@ -59,8 +60,6 @@ interface BillRepositoryInterface
|
||||
*/
|
||||
public function nextDateMatch(Bill $bill, Carbon $date): Carbon;
|
||||
|
||||
public function setUser(User $user): void;
|
||||
|
||||
/**
|
||||
* Collect multi-currency of sum of bills already paid.
|
||||
*/
|
||||
|
@@ -32,6 +32,8 @@ use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class AvailableBudgetRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface
|
||||
{
|
||||
|
@@ -25,14 +25,13 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Repositories\UserGroups\Budget;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\User;
|
||||
|
||||
/**
|
||||
* Interface AvailableBudgetRepositoryInterface
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface AvailableBudgetRepositoryInterface
|
||||
{
|
||||
public function getAvailableBudgetWithCurrency(Carbon $start, Carbon $end): array;
|
||||
|
||||
public function setUser(User $user): void;
|
||||
}
|
||||
|
@@ -29,6 +29,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class BudgetRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class BudgetRepository implements BudgetRepositoryInterface
|
||||
{
|
||||
|
@@ -24,20 +24,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Repositories\UserGroups\Budget;
|
||||
|
||||
use FireflyIII\Models\UserGroup;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface BudgetRepositoryInterface
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface BudgetRepositoryInterface
|
||||
{
|
||||
public function getActiveBudgets(): Collection;
|
||||
|
||||
public function getBudgets(): Collection;
|
||||
|
||||
public function setUser(User $user): void;
|
||||
|
||||
public function setUserGroup(UserGroup $userGroup): void;
|
||||
}
|
||||
|
@@ -33,6 +33,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class OperationsRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class OperationsRepository implements OperationsRepositoryInterface
|
||||
{
|
||||
|
@@ -25,11 +25,12 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Repositories\UserGroups\Budget;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface OperationsRepositoryInterface
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface OperationsRepositoryInterface
|
||||
{
|
||||
@@ -39,6 +40,4 @@ interface OperationsRepositoryInterface
|
||||
* as possible. Amounts are always negative.
|
||||
*/
|
||||
public function listExpenses(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $budgets = null): array;
|
||||
|
||||
public function setUser(User $user): void;
|
||||
}
|
||||
|
@@ -28,6 +28,11 @@ use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class CategoryRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class CategoryRepository implements CategoryRepositoryInterface
|
||||
{
|
||||
use UserGroupTrait;
|
||||
|
@@ -26,6 +26,11 @@ namespace FireflyIII\Repositories\UserGroups\Category;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface CategoryRepositoryInterface
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface CategoryRepositoryInterface
|
||||
{
|
||||
/**
|
||||
|
@@ -43,6 +43,8 @@ use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class CurrencyRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
{
|
||||
|
@@ -27,15 +27,17 @@ namespace FireflyIII\Repositories\UserGroups\Currency;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Models\UserGroup;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface CurrencyRepositoryInterface
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface CurrencyRepositoryInterface
|
||||
{
|
||||
public function currencyInUse(TransactionCurrency $currency): bool;
|
||||
|
||||
public function getUserGroup(): UserGroup;
|
||||
|
||||
/**
|
||||
* Currency is in use where exactly.
|
||||
*/
|
||||
@@ -86,14 +88,14 @@ interface CurrencyRepositoryInterface
|
||||
|
||||
public function getByIds(array $ids): Collection;
|
||||
|
||||
public function getUserGroup(): UserGroup;
|
||||
|
||||
public function isFallbackCurrency(TransactionCurrency $currency): bool;
|
||||
|
||||
public function makeDefault(TransactionCurrency $currency): void;
|
||||
|
||||
public function searchCurrency(string $search, int $limit): Collection;
|
||||
|
||||
public function setUser(User $user): void;
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
*/
|
||||
|
@@ -31,10 +31,27 @@ use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class ExchangeRateRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class ExchangeRateRepository implements ExchangeRateRepositoryInterface
|
||||
{
|
||||
use UserGroupTrait;
|
||||
|
||||
#[\Override]
|
||||
public function deleteRate(CurrencyExchangeRate $rate): void
|
||||
{
|
||||
$this->userGroup->currencyExchangeRates()->where('id', $rate->id)->delete();
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAll(): Collection
|
||||
{
|
||||
return $this->userGroup->currencyExchangeRates()->orderBy('date', 'ASC')->get();
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getRates(TransactionCurrency $from, TransactionCurrency $to): Collection
|
||||
{
|
||||
@@ -71,24 +88,6 @@ class ExchangeRateRepository implements ExchangeRateRepositoryInterface
|
||||
;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function deleteRate(CurrencyExchangeRate $rate): void
|
||||
{
|
||||
$this->userGroup->currencyExchangeRates()->where('id', $rate->id)->delete();
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function updateExchangeRate(CurrencyExchangeRate $object, string $rate, ?Carbon $date = null): CurrencyExchangeRate
|
||||
{
|
||||
$object->rate = $rate;
|
||||
if (null !== $date) {
|
||||
$object->date = $date;
|
||||
}
|
||||
$object->save();
|
||||
|
||||
return $object;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function storeExchangeRate(TransactionCurrency $from, TransactionCurrency $to, string $rate, Carbon $date): CurrencyExchangeRate
|
||||
{
|
||||
@@ -106,8 +105,14 @@ class ExchangeRateRepository implements ExchangeRateRepositoryInterface
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAll(): Collection
|
||||
public function updateExchangeRate(CurrencyExchangeRate $object, string $rate, ?Carbon $date = null): CurrencyExchangeRate
|
||||
{
|
||||
return $this->userGroup->currencyExchangeRates()->orderBy('date', 'ASC')->get();
|
||||
$object->rate = $rate;
|
||||
if (null !== $date) {
|
||||
$object->date = $date;
|
||||
}
|
||||
$object->save();
|
||||
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
@@ -29,17 +29,22 @@ use FireflyIII\Models\CurrencyExchangeRate;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface ExchangeRateRepositoryInterface
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface ExchangeRateRepositoryInterface
|
||||
{
|
||||
public function getRates(TransactionCurrency $from, TransactionCurrency $to): Collection;
|
||||
public function deleteRate(CurrencyExchangeRate $rate): void;
|
||||
|
||||
public function getAll(): Collection;
|
||||
|
||||
public function getRates(TransactionCurrency $from, TransactionCurrency $to): Collection;
|
||||
|
||||
public function getSpecificRateOnDate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date): ?CurrencyExchangeRate;
|
||||
|
||||
public function deleteRate(CurrencyExchangeRate $rate): void;
|
||||
public function storeExchangeRate(TransactionCurrency $from, TransactionCurrency $to, string $rate, Carbon $date): CurrencyExchangeRate;
|
||||
|
||||
public function updateExchangeRate(CurrencyExchangeRate $object, string $rate, ?Carbon $date = null): CurrencyExchangeRate;
|
||||
|
||||
public function storeExchangeRate(TransactionCurrency $from, TransactionCurrency $to, string $rate, Carbon $date): CurrencyExchangeRate;
|
||||
}
|
||||
|
@@ -30,6 +30,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class JournalRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class JournalRepository implements JournalRepositoryInterface
|
||||
{
|
||||
|
@@ -24,11 +24,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Repositories\UserGroups\Journal;
|
||||
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface JournalRepositoryInterface
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface JournalRepositoryInterface
|
||||
{
|
||||
@@ -36,6 +37,4 @@ interface JournalRepositoryInterface
|
||||
* Search in journal descriptions.
|
||||
*/
|
||||
public function searchJournalDescriptions(array $query, int $limit): Collection;
|
||||
|
||||
public function setUser(User $user): void;
|
||||
}
|
||||
|
@@ -30,6 +30,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class PiggyBankRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
{
|
||||
|
@@ -28,6 +28,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface PiggyBankRepositoryInterface
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface PiggyBankRepositoryInterface
|
||||
{
|
||||
|
@@ -30,6 +30,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class TagRepository
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class TagRepository implements TagRepositoryInterface
|
||||
{
|
||||
|
@@ -26,6 +26,11 @@ namespace FireflyIII\Repositories\UserGroups\Tag;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface TagRepositoryInterface
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
interface TagRepositoryInterface
|
||||
{
|
||||
/**
|
||||
|
Reference in New Issue
Block a user