diff --git a/app/Helpers/Collection/BudgetLine.php b/app/Helpers/Collection/BudgetLine.php index b8f76488a1..f26950f9f9 100644 --- a/app/Helpers/Collection/BudgetLine.php +++ b/app/Helpers/Collection/BudgetLine.php @@ -17,16 +17,14 @@ class BudgetLine /** @var BudgetModel */ protected $budget; - - /** @var LimitRepetition */ - protected $repetition; - /** @var float */ protected $budgeted = 0; /** @var float */ protected $left = 0; /** @var float */ protected $overspent = 0; + /** @var LimitRepetition */ + protected $repetition; /** @var float */ protected $spent = 0; @@ -94,22 +92,6 @@ class BudgetLine $this->overspent = $overspent; } - /** - * @return float - */ - public function getSpent() - { - return $this->spent; - } - - /** - * @param float $spent - */ - public function setSpent($spent) - { - $this->spent = $spent; - } - /** * @return LimitRepetition */ @@ -126,5 +108,21 @@ class BudgetLine $this->repetition = $repetition; } + /** + * @return float + */ + public function getSpent() + { + return $this->spent; + } + + /** + * @param float $spent + */ + public function setSpent($spent) + { + $this->spent = $spent; + } + } diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index ce160a0d88..88d69cc294 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -34,6 +34,7 @@ class ReportHelper implements ReportHelperInterface /** * @codeCoverageIgnore + * * @param ReportQueryInterface $query * */ @@ -64,11 +65,13 @@ class ReportHelper implements ReportHelperInterface $diff = 0; // remove cash account, if any: - $accounts =$accounts->filter(function(Account $account) { - if($account->accountType->type != 'Cash account') { - return $account; + $accounts = $accounts->filter( + function (Account $account) { + if ($account->accountType->type != 'Cash account') { + return $account; + } } - }); + ); // summarize: foreach ($accounts as $account) { diff --git a/app/Helpers/Report/ReportQuery.php b/app/Helpers/Report/ReportQuery.php index 990f6aef30..8675989368 100644 --- a/app/Helpers/Report/ReportQuery.php +++ b/app/Helpers/Report/ReportQuery.php @@ -5,12 +5,10 @@ namespace FireflyIII\Helpers\Report; use Auth; use Carbon\Carbon; use Crypt; -use DB; use FireflyIII\Models\Account; use FireflyIII\Models\Budget; use FireflyIII\Models\TransactionJournal; use Illuminate\Database\Eloquent\Builder; -use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; use Steam; @@ -138,7 +136,6 @@ class ReportQuery implements ReportQueryInterface * This method returns all "income" journals in a certain period, which are both transfers from a shared account * and "ordinary" deposits. The query used is almost equal to ReportQueryInterface::journalsByRevenueAccount but it does * not group and returns different fields. - * * @param Carbon $start * @param Carbon $end @@ -241,7 +238,8 @@ class ReportQuery implements ReportQueryInterface ->where('transactions.account_id', $account->id) ->before($end) ->after($start) - ->whereNull('budget_transaction_journal.budget_id')->get(['transaction_journals.*'])->sum('amount')); + ->whereNull('budget_transaction_journal.budget_id')->get(['transaction_journals.*'])->sum('amount') + ); } /** diff --git a/app/Http/breadcrumbs.php b/app/Http/breadcrumbs.php index 289eec2ca5..8f575043e4 100644 --- a/app/Http/breadcrumbs.php +++ b/app/Http/breadcrumbs.php @@ -1,7 +1,6 @@ parent('accounts.show', $account); $what = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type); - $breadcrumbs->push(trans('breadcrumbs.edit_'.$what.'_account', ['name' => e($account->name)]), route('accounts.edit', $account->id)); + $breadcrumbs->push(trans('breadcrumbs.edit_' . $what . '_account', ['name' => e($account->name)]), route('accounts.edit', $account->id)); } ); diff --git a/app/Http/routes.php b/app/Http/routes.php index 3f1f2066cf..9cff899bab 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -199,7 +199,7 @@ Route::controllers( */ Route::group( ['middleware' => ['auth', 'range', 'reminders', 'piggybanks']], function () { - Route::get('/', ['uses' => 'HomeController@index', 'as' => 'index','middleware' => 'cleanup']); + Route::get('/', ['uses' => 'HomeController@index', 'as' => 'index', 'middleware' => 'cleanup']); Route::get('/home', ['uses' => 'HomeController@index', 'as' => 'home']); Route::post('/daterange', ['uses' => 'HomeController@dateRange', 'as' => 'daterange']); Route::get('/flush', ['uses' => 'HomeController@flush', 'as' => 'flush']); diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 1a0b4f0823..98dd165042 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -310,7 +310,6 @@ class BudgetRepository implements BudgetRepositoryInterface } - /** * @param Budget $budget * @param array $data diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index a6c7de1d3c..ed4ed70654 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -5,7 +5,6 @@ namespace FireflyIII\Repositories\Category; use Auth; use Carbon\Carbon; use Crypt; -use DB; use FireflyIII\Models\Category; use FireflyIII\Models\TransactionJournal; use Illuminate\Database\Query\JoinClause; diff --git a/resources/twig/budgets/income.twig b/resources/twig/budgets/income.twig index fa89e27828..12cc983ae0 100644 --- a/resources/twig/budgets/income.twig +++ b/resources/twig/budgets/income.twig @@ -18,4 +18,4 @@ - \ No newline at end of file +