mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Remove JSON exceptions that are not thrown anyway.
This commit is contained in:
@@ -221,8 +221,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function getCashAccount(): Account
|
||||
{
|
||||
/** @var AccountType $type */
|
||||
@@ -343,8 +342,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function getReconciliation(Account $account): ?Account
|
||||
{
|
||||
if (AccountType::ASSET !== $account->accountType->type) {
|
||||
@@ -619,8 +617,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function store(array $data): Account
|
||||
{
|
||||
/** @var AccountFactory $factory */
|
||||
@@ -632,8 +629,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function update(Account $account, array $data): Account
|
||||
{
|
||||
/** @var AccountUpdateService $service */
|
||||
|
@@ -42,8 +42,7 @@ class AccountTasker implements AccountTaskerInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): array
|
||||
{
|
||||
$yesterday = clone $start;
|
||||
@@ -110,8 +109,7 @@ class AccountTasker implements AccountTaskerInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): array
|
||||
{
|
||||
// get all expenses for the given accounts in the given period!
|
||||
@@ -142,8 +140,7 @@ class AccountTasker implements AccountTaskerInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): array
|
||||
{
|
||||
// get all incomes for the given accounts in the given period!
|
||||
@@ -178,8 +175,7 @@ class AccountTasker implements AccountTaskerInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
private function groupExpenseByDestination(array $array): array
|
||||
{
|
||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
|
||||
@@ -239,8 +235,7 @@ class AccountTasker implements AccountTaskerInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
private function groupIncomeBySource(array $array): array
|
||||
{
|
||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
|
||||
|
@@ -422,8 +422,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
/**
|
||||
* Given the date in $date, this method will return a moment in the future where the bill is expected to be paid.
|
||||
*
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function nextExpectedMatch(Bill $bill, Carbon $date): Carbon
|
||||
{
|
||||
$cache = new CacheProperties();
|
||||
@@ -464,8 +463,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function store(array $data): Bill
|
||||
{
|
||||
/** @var BillFactory $factory */
|
||||
@@ -645,8 +643,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function update(Bill $bill, array $data): Bill
|
||||
{
|
||||
/** @var BillUpdateService $service */
|
||||
|
@@ -261,8 +261,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function store(array $data): BudgetLimit
|
||||
{
|
||||
// if no currency has been provided, use the user's default currency:
|
||||
@@ -317,8 +316,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function update(BudgetLimit $budgetLimit, array $data): BudgetLimit
|
||||
{
|
||||
$budgetLimit->amount = array_key_exists('amount', $data) ? $data['amount'] : $budgetLimit->amount;
|
||||
|
@@ -233,8 +233,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function update(Budget $budget, array $data): Budget
|
||||
{
|
||||
app('log')->debug('Now in update()');
|
||||
@@ -565,8 +564,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function store(array $data): Budget
|
||||
{
|
||||
$order = $this->getMaxOrder();
|
||||
@@ -752,8 +750,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
private function updateAutoBudget(Budget $budget, array $data): void
|
||||
{
|
||||
// update or create auto-budget:
|
||||
|
@@ -85,8 +85,7 @@ trait ModifiesPiggyBanks
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function canAddAmount(PiggyBank $piggyBank, string $amount): bool
|
||||
{
|
||||
$today = today(config('app.timezone'));
|
||||
|
@@ -135,8 +135,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
* Used for connecting to a piggy bank.
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function getExactAmount(PiggyBank $piggyBank, PiggyBankRepetition $repetition, TransactionJournal $journal): string
|
||||
{
|
||||
app('log')->debug(sprintf('Now in getExactAmount(%d, %d, %d)', $piggyBank->id, $repetition->id, $journal->id));
|
||||
@@ -320,8 +319,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
/**
|
||||
* Get for piggy account what is left to put in piggies.
|
||||
*
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function leftOnAccount(PiggyBank $piggyBank, Carbon $date): string
|
||||
{
|
||||
$balance = app('steam')->balanceIgnoreVirtual($piggyBank->account, $date);
|
||||
|
@@ -259,8 +259,7 @@ class RecurringRepository implements RecurringRepositoryInterface
|
||||
/**
|
||||
* Get the tags from the recurring transaction.
|
||||
*
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function getTags(RecurrenceTransaction $transaction): array
|
||||
{
|
||||
$tags = [];
|
||||
@@ -480,8 +479,7 @@ class RecurringRepository implements RecurringRepositoryInterface
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function store(array $data): Recurrence
|
||||
{
|
||||
/** @var RecurrenceFactory $factory */
|
||||
|
@@ -255,8 +255,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
|
||||
* Return all piggy bank events for all journals in the group.
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function getPiggyEvents(TransactionGroup $group): array
|
||||
{
|
||||
$return = [];
|
||||
@@ -319,8 +318,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
|
||||
/**
|
||||
* @throws DuplicateTransactionException
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function store(array $data): TransactionGroup
|
||||
{
|
||||
/** @var TransactionGroupFactory $factory */
|
||||
|
@@ -217,8 +217,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
* Find by object, ID or code. Returns user default or system default.
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function findCurrency(?int $currencyId, ?string $currencyCode): TransactionCurrency
|
||||
{
|
||||
$result = $this->findCurrencyNull($currencyId, $currencyCode);
|
||||
|
Reference in New Issue
Block a user