Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Some code cleanup [skip ci]
James Cole1c1fe672bd4b
diff --git a/app/Handlers/Events/ConnectJournalToPiggyBank.php b/app/Handlers/Events/ConnectJournalToPiggyBank.phpindex 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.phpindex 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.phpindex 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.phpindex 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.phpindex 2cf3aa2fda..dc51ad3f92 100644--- a/app/Models/Category.php+++ b/app/Models/Category.php@@ -1,6 +1,5 @@<?php namespace FireflyIII\Models;-use App;use Crypt;use Illuminate\Database\Eloquent\Model;use Illuminate\Database\Eloquent\SoftDeletes;diff --git a/app/Models/Tag.php b/app/Models/Tag.phpindex 719641de02..3a1f1fd9a9 100644--- a/app/Models/Tag.php+++ b/app/Models/Tag.php@@ -2,7 +2,6 @@namespace FireflyIII\Models;-use App;use Crypt;use Illuminate\Database\Eloquent\Model;use Watson\Validating\ValidatingTrait;diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.phpindex b41c73b671..290d967503 100644--- a/app/Repositories/Bill/BillRepository.php+++ b/app/Repositories/Bill/BillRepository.php@@ -10,7 +10,6 @@ use FireflyIII\Models\AccountType;use FireflyIII\Models\Bill;use FireflyIII\Models\Transaction;use FireflyIII\Models\TransactionJournal;-use Illuminate\Database\Query\JoinClause;use Illuminate\Support\Collection;use Log;use Navigation;diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.phpindex 46b0ecbc24..ddc95d23ca 100644--- a/app/Repositories/Budget/BudgetRepository.php+++ b/app/Repositories/Budget/BudgetRepository.php@@ -251,7 +251,7 @@ class BudgetRepository implements BudgetRepositoryInterface->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.phpindex 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.phpindex 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;