mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup.
This commit is contained in:
@@ -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:
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -22,8 +22,6 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Repositories\Budget;
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
|
@@ -22,8 +22,6 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Repositories\Budget;
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\User;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -43,8 +43,6 @@ interface OperationsRepositoryInterface
|
||||
* @return string
|
||||
*/
|
||||
public function budgetedPerDay(Budget $budget): string;
|
||||
|
||||
|
||||
/**
|
||||
* @param Collection $budgets
|
||||
* @param Collection $accounts
|
||||
|
Reference in New Issue
Block a user