From 1c1fe672bd4b8e857559729192ebca645d9f1df0 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 May 2015 11:41:52 +0200 Subject: [PATCH] Some code cleanup [skip ci] --- app/Handlers/Events/ConnectJournalToPiggyBank.php | 1 + app/Helpers/Collection/Income.php | 2 +- app/Http/Controllers/Auth/PasswordController.php | 1 + app/Http/Controllers/ReportController.php | 1 + app/Models/Category.php | 1 - app/Models/Tag.php | 1 - app/Repositories/Bill/BillRepository.php | 1 - app/Repositories/Budget/BudgetRepository.php | 2 +- app/Repositories/Journal/JournalRepository.php | 5 +++-- app/Support/Twig/Budget.php | 1 - 10 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Handlers/Events/ConnectJournalToPiggyBank.php b/app/Handlers/Events/ConnectJournalToPiggyBank.php index 694d480043..f33e283fa1 100644 --- a/app/Handlers/Events/ConnectJournalToPiggyBank.php +++ b/app/Handlers/Events/ConnectJournalToPiggyBank.php @@ -17,6 +17,7 @@ class ConnectJournalToPiggyBank /** * Create the event handler. + * * @codeCoverageIgnore * */ diff --git a/app/Helpers/Collection/Income.php b/app/Helpers/Collection/Income.php index 9dd0e279d7..638e42d06a 100644 --- a/app/Helpers/Collection/Income.php +++ b/app/Helpers/Collection/Income.php @@ -45,7 +45,7 @@ class Income $this->incomes->put($accountId, $newObject); } else { bcscale(2); - $existing = $this->incomes->get($accountId); + $existing = $this->incomes->get($accountId); $existing->amount = bcadd($existing->amount, $entry->amount); $existing->count++; $this->incomes->put($accountId, $existing); diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.php index 9b5bb33d32..e5ca5e6225 100644 --- a/app/Http/Controllers/Auth/PasswordController.php +++ b/app/Http/Controllers/Auth/PasswordController.php @@ -35,6 +35,7 @@ class PasswordController extends Controller * * @param \Illuminate\Contracts\Auth\Guard $auth * @param \Illuminate\Contracts\Auth\PasswordBroker $passwords + * * @codeCoverageIgnore * */ diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 953844a34e..21a072cba5 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -24,6 +24,7 @@ class ReportController extends Controller /** * @codeCoverageIgnore + * * @param ReportHelperInterface $helper */ public function __construct(ReportHelperInterface $helper) diff --git a/app/Models/Category.php b/app/Models/Category.php index 2cf3aa2fda..dc51ad3f92 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -1,6 +1,5 @@ after($start) ->before($end) ->transactionTypes(['Withdrawal']) - ->get(['transaction_journals.*'])->sum('amount'); + ->get(['transaction_journals.*'])->sum('amount'); return floatval($noBudgetSet) * -1; } diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 120e96780e..cdc0775a46 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -82,11 +82,12 @@ class JournalRepository implements JournalRepositoryInterface ->where('transaction_journals.date', '<=', $journal->date->format('Y-m-d')) ->where('transaction_journals.order', '>=', $journal->order) ->where('transaction_journals.id', '!=', $journal->id) - ->get(['transactions.*']); + ->get(['transactions.*']); $sum = 0; - foreach($set as $entry) { + foreach ($set as $entry) { $sum += $entry->amount; } + return $sum; } diff --git a/app/Support/Twig/Budget.php b/app/Support/Twig/Budget.php index d19e7f658b..07efad3191 100644 --- a/app/Support/Twig/Budget.php +++ b/app/Support/Twig/Budget.php @@ -3,7 +3,6 @@ namespace FireflyIII\Support\Twig; use Auth; -use DB; use FireflyIII\Models\LimitRepetition; use Twig_Extension; use Twig_SimpleFunction;