Various code cleanup.

This commit is contained in:
James Cole
2022-12-30 09:28:03 +01:00
parent 03e176bd16
commit ee0116f112
17 changed files with 171 additions and 125 deletions

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Budget;
use Carbon\Carbon;
use Exception;
use FireflyIII\Models\AvailableBudget;
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\User;
@@ -52,11 +51,7 @@ class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface
*/
public function destroyAvailableBudget(AvailableBudget $availableBudget): void
{
try {
$availableBudget->delete();
} catch (Exception $e) {
// @ignoreException
}
$availableBudget->delete();
}
/**

View File

@@ -89,6 +89,7 @@ interface OperationsRepositoryInterface
public function spentInPeriodMc(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): array;
/**
* TODO this method was marked as deprecated but I'm not sure why.
* @param Carbon $start
* @param Carbon $end
* @param Collection|null $accounts
@@ -96,7 +97,7 @@ interface OperationsRepositoryInterface
* @param TransactionCurrency|null $currency
*
* @return array
* @deprecated
*
*/
public function sumExpenses(
Carbon $start,