Code cleanup.

This commit is contained in:
James Cole
2021-03-28 11:43:07 +02:00
parent 5abbb8a807
commit 2c575f3ca5
379 changed files with 304 additions and 1727 deletions

View File

@@ -22,8 +22,6 @@
declare(strict_types=1);
namespace FireflyIII\Repositories\Budget;
use Carbon\Carbon;
use Exception;
use FireflyIII\Exceptions\FireflyException;
@@ -428,8 +426,6 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
} catch (Exception $e) {
Log::debug(sprintf('Could not delete limit: %s', $e->getMessage()));
}
return null;
}
// update if exists:

View File

@@ -422,8 +422,6 @@ class BudgetRepository implements BudgetRepositoryInterface
if (null === $currency) {
$currency = app('amount')->getDefaultCurrencyByUser($this->user);
}
if (null === $autoBudget
&& array_key_exists('auto_budget_type', $data)
&& array_key_exists('auto_budget_amount', $data)
@@ -463,8 +461,6 @@ class BudgetRepository implements BudgetRepositoryInterface
if (null !== $autoBudget) {
$autoBudget->save();
}
return $budget;
}

View File

@@ -22,8 +22,6 @@
declare(strict_types=1);
namespace FireflyIII\Repositories\Budget;
use Carbon\Carbon;
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\TransactionCurrency;

View File

@@ -22,8 +22,6 @@
declare(strict_types=1);
namespace FireflyIII\Repositories\Budget;
use Carbon\Carbon;
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\User;

View File

@@ -87,8 +87,6 @@ class OperationsRepository implements OperationsRepositoryInterface
{
$carbonFormat = app('navigation')->preferredCarbonFormat($start, $end);
$data = [];
// get all transactions:
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
@@ -183,8 +181,6 @@ class OperationsRepository implements OperationsRepositoryInterface
// add journal to array:
// only a subset of the fields.
$journalId = (int)$journal['transaction_journal_id'];
$array[$currencyId]['budgets'][$budgetId]['transaction_journals'][$journalId] = [
'amount' => app('steam')->negative($journal['amount']),
'destination_account_id' => $journal['destination_account_id'],
@@ -347,8 +343,6 @@ class OperationsRepository implements OperationsRepositoryInterface
$array[$foreignId]['sum'] = bcadd($array[$foreignId]['sum'], app('steam')->negative($journal['foreign_amount']));
}
}
return $array;
}

View File

@@ -43,8 +43,6 @@ interface OperationsRepositoryInterface
* @return string
*/
public function budgetedPerDay(Budget $budget): string;
/**
* @param Collection $budgets
* @param Collection $accounts