diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 3bd0736110..2eb8b8f47b 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -67,11 +67,12 @@ class AccountController extends Controller } /** - * @param Account $account + * @param AccountRepositoryInterface $repository + * @param Account $account * * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Account $account, AccountRepositoryInterface $repository) + public function destroy(AccountRepositoryInterface $repository, Account $account) { $type = $account->accountType->type; @@ -86,12 +87,12 @@ class AccountController extends Controller } /** - * @param Account $account * @param AccountRepositoryInterface $repository + * @param Account $account * * @return View */ - public function edit(Account $account, AccountRepositoryInterface $repository) + public function edit(AccountRepositoryInterface $repository,Account $account) { $what = Config::get('firefly.shortNamesByFullName')[$account->accountType->type]; @@ -129,12 +130,12 @@ class AccountController extends Controller } /** - * @param $what * @param AccountRepositoryInterface $repository + * @param $what * * @return View */ - public function index($what, AccountRepositoryInterface $repository) + public function index(AccountRepositoryInterface $repository, $what) { $subTitle = Config::get('firefly.subTitlesByIdentifier.' . $what); $subTitleIcon = Config::get('firefly.subIconsByIdentifier.' . $what); @@ -158,12 +159,12 @@ class AccountController extends Controller } /** - * @param Account $account * @param AccountRepositoryInterface $repository + * @param Account $account * * @return View */ - public function show(Account $account, AccountRepositoryInterface $repository) + public function show(AccountRepositoryInterface $repository, Account $account) { $page = intval(Input::get('page')) == 0 ? 1 : intval(Input::get('page')); $subTitleIcon = Config::get('firefly.subTitlesByIdentifier.' . $account->accountType->type); @@ -214,13 +215,13 @@ class AccountController extends Controller } /** - * @param Account $account * @param AccountFormRequest $request * @param AccountRepositoryInterface $repository + * @param Account $account * - * @return \Illuminate\Http\RedirectResponse + * @return $this|\Illuminate\Http\RedirectResponse */ - public function update(Account $account, AccountFormRequest $request, AccountRepositoryInterface $repository) + public function update(AccountFormRequest $request, AccountRepositoryInterface $repository, Account $account) { $accountData = [ diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php index c26d595a93..f658c5cc35 100644 --- a/app/Http/Controllers/BillController.php +++ b/app/Http/Controllers/BillController.php @@ -35,11 +35,12 @@ class BillController extends Controller } /** - * @param Bill $bill + * @param AccountRepositoryInterface $repository + * @param Bill $bill * * @return \Illuminate\Http\RedirectResponse */ - public function add(Bill $bill, AccountRepositoryInterface $repository) + public function add(AccountRepositoryInterface $repository, Bill $bill) { $matches = explode(',', $bill->match); $description = []; @@ -107,11 +108,12 @@ class BillController extends Controller } /** - * @param Bill $bill + * @param BillRepositoryInterface $repository + * @param Bill $bill * * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Bill $bill, BillRepositoryInterface $repository) + public function destroy(BillRepositoryInterface $repository, Bill $bill) { $repository->destroy($bill); @@ -158,11 +160,12 @@ class BillController extends Controller } /** - * @param Bill $bill + * @param BillRepositoryInterface $repository + * @param Bill $bill * - * @return mixed + * @return \Illuminate\Http\RedirectResponse */ - public function rescan(Bill $bill, BillRepositoryInterface $repository) + public function rescan(BillRepositoryInterface $repository, Bill $bill) { if (intval($bill->active) == 0) { Session::flash('warning', 'Inactive bills cannot be scanned.'); @@ -183,11 +186,12 @@ class BillController extends Controller } /** - * @param Bill $bill + * @param BillRepositoryInterface $repository + * @param Bill $bill * * @return mixed */ - public function show(Bill $bill, BillRepositoryInterface $repository) + public function show(BillRepositoryInterface $repository, Bill $bill) { $journals = $repository->getJournals($bill); $bill->nextExpectedMatch = $repository->nextExpectedMatch($bill); @@ -197,7 +201,10 @@ class BillController extends Controller } /** - * @return $this + * @param BillFormRequest $request + * @param BillRepositoryInterface $repository + * + * @return $this|\Illuminate\Http\RedirectResponse */ public function store(BillFormRequest $request, BillRepositoryInterface $repository) { @@ -218,11 +225,13 @@ class BillController extends Controller } /** - * @param Bill $bill + * @param BillFormRequest $request + * @param BillRepositoryInterface $repository + * @param Bill $bill * - * @return $this + * @return $this|\Illuminate\Http\RedirectResponse */ - public function update(Bill $bill, BillFormRequest $request, BillRepositoryInterface $repository) + public function update(BillFormRequest $request, BillRepositoryInterface $repository, Bill $bill) { $billData = $request->getBillData(); $bill = $repository->update($bill, $billData); diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php index 9fb31e661e..ee1e8cdceb 100644 --- a/app/Http/Controllers/BudgetController.php +++ b/app/Http/Controllers/BudgetController.php @@ -36,11 +36,12 @@ class BudgetController extends Controller } /** - * @param Budget $budget + * @param BudgetRepositoryInterface $repository + * @param Budget $budget * - * @return \Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response */ - public function amount(Budget $budget, BudgetRepositoryInterface $repository) + public function amount(BudgetRepositoryInterface $repository, Budget $budget) { $amount = intval(Input::get('amount')); $date = Session::get('start', Carbon::now()->startOfMonth()); @@ -80,7 +81,8 @@ class BudgetController extends Controller } /** - * @param Budget $budget + * @param Budget $budget + * @param BudgetRepositoryInterface $repository * * @return \Illuminate\Http\RedirectResponse */ @@ -116,7 +118,9 @@ class BudgetController extends Controller } /** - * @return mixed + * @param BudgetRepositoryInterface $repository + * + * @return View */ public function index(BudgetRepositoryInterface $repository) { @@ -150,7 +154,9 @@ class BudgetController extends Controller } /** - * @return \Illuminate\View\View + * @param BudgetRepositoryInterface $repository + * + * @return View */ public function noBudget(BudgetRepositoryInterface $repository) { @@ -163,7 +169,7 @@ class BudgetController extends Controller } /** - * @return mixed + * @return \Illuminate\Http\RedirectResponse */ public function postUpdateIncome() { @@ -175,13 +181,13 @@ class BudgetController extends Controller } /** + * @param BudgetRepositoryInterface $repository + * @param Budget $budget + * @param LimitRepetition $repetition * - * @param Budget $budget - * @param LimitRepetition $repetition - * - * @return \Illuminate\View\View + * @return View */ - public function show(Budget $budget, LimitRepetition $repetition = null, BudgetRepositoryInterface $repository) + public function show(BudgetRepositoryInterface $repository, Budget $budget, LimitRepetition $repetition = null) { if (!is_null($repetition->id) && $repetition->budgetLimit->budget->id != $budget->id) { return view('error')->with('message', 'Invalid selection.'); @@ -224,13 +230,13 @@ class BudgetController extends Controller } /** - * @param Budget $budget * @param BudgetFormRequest $request * @param BudgetRepositoryInterface $repository + * @param Budget $budget * - * @return \Illuminate\Http\RedirectResponse + * @return $this|\Illuminate\Http\RedirectResponse */ - public function update(Budget $budget, BudgetFormRequest $request, BudgetRepositoryInterface $repository) + public function update(BudgetFormRequest $request, BudgetRepositoryInterface $repository, Budget $budget) { $budgetData = [ 'name' => $request->input('name'), @@ -254,14 +260,14 @@ class BudgetController extends Controller } /** - * @return $this + * @return View */ public function updateIncome() { $date = Session::get('start', Carbon::now()->startOfMonth())->format('FY'); - $budgetAmount = Preferences::get('budgetIncomeTotal' . $date, 1000); + $amount = Preferences::get('budgetIncomeTotal' . $date, 1000); - return view('budgets.income')->with('amount', $budgetAmount); + return view('budgets.income',compact('amount')); } } diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index 6b864f11f2..ab5983980b 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -61,11 +61,12 @@ class CategoryController extends Controller } /** - * @param Category $category + * @param CategoryRepositoryInterface $repository + * @param Category $category * * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Category $category, CategoryRepositoryInterface $repository) + public function destroy(CategoryRepositoryInterface $repository, Category $category) { $name = $category->name; @@ -126,11 +127,12 @@ class CategoryController extends Controller } /** - * @param Category $category + * @param CategoryRepositoryInterface $repository + * @param Category $category * - * @return $this + * @return View */ - public function show(Category $category, CategoryRepositoryInterface $repository) + public function show(CategoryRepositoryInterface $repository, Category $category) { $hideCategory = true; // used in list. $page = intval(Input::get('page')); @@ -169,13 +171,13 @@ class CategoryController extends Controller /** - * @param Category $category * @param CategoryFormRequest $request * @param CategoryRepositoryInterface $repository + * @param Category $category * * @return \Illuminate\Http\RedirectResponse */ - public function update(Category $category, CategoryFormRequest $request, CategoryRepositoryInterface $repository) + public function update(CategoryFormRequest $request, CategoryRepositoryInterface $repository, Category $category) { $categoryData = [ 'name' => $request->input('name'), diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index 33e100ca6d..ec8863c481 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -68,11 +68,12 @@ class CurrencyController extends Controller } /** - * @param TransactionCurrency $currency + * @param CurrencyRepositoryInterface $repository + * @param TransactionCurrency $currency * - * @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View + * @return \Illuminate\Http\RedirectResponse|View */ - public function delete(TransactionCurrency $currency, CurrencyRepositoryInterface $repository) + public function delete(CurrencyRepositoryInterface $repository, TransactionCurrency $currency) { if ($repository->countJournals($currency) > 0) { @@ -89,11 +90,13 @@ class CurrencyController extends Controller } /** - * @param TransactionCurrency $currency + * @param CurrencyRepositoryInterface $repository + * @param TransactionCurrency $currency * * @return \Illuminate\Http\RedirectResponse + * @throws \Exception */ - public function destroy(TransactionCurrency $currency, CurrencyRepositoryInterface $repository) + public function destroy(CurrencyRepositoryInterface $repository, TransactionCurrency $currency) { if ($repository->countJournals($currency) > 0) { Session::flash('error', 'Cannot destroy ' . e($currency->name) . ' because there are still transactions attached to it.'); @@ -166,11 +169,13 @@ class CurrencyController extends Controller } /** - * @param TransactionCurrency $currency + * @param CurrencyFormRequest $request + * @param CurrencyRepositoryInterface $repository + * @param TransactionCurrency $currency * - * @return $this|\Illuminate\Http\RedirectResponse + * @return \Illuminate\Http\RedirectResponse */ - public function update(TransactionCurrency $currency, CurrencyFormRequest $request, CurrencyRepositoryInterface $repository) + public function update(CurrencyFormRequest $request, CurrencyRepositoryInterface $repository, TransactionCurrency $currency) { $data = $request->getCurrencyData(); $currency = $repository->update($currency, $data); diff --git a/app/Http/Controllers/GoogleChartController.php b/app/Http/Controllers/GoogleChartController.php index b377231d67..c7751d889d 100644 --- a/app/Http/Controllers/GoogleChartController.php +++ b/app/Http/Controllers/GoogleChartController.php @@ -35,12 +35,12 @@ class GoogleChartController extends Controller /** + * @param GChart $chart * @param Account $account - * @param string $view * - * @return \Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response */ - public function accountBalanceChart(Account $account, GChart $chart) + public function accountBalanceChart(GChart $chart, Account $account) { $chart->addColumn('Day of month', 'date'); $chart->addColumn('Balance for ' . $account->name, 'number'); @@ -64,7 +64,8 @@ class GoogleChartController extends Controller } /** - * @param GChart $chart + * @param GChart $chart + * @param AccountRepositoryInterface $repository * * @return \Symfony\Component\HttpFoundation\Response */ @@ -104,11 +105,13 @@ class GoogleChartController extends Controller } /** - * @param int $year + * @param GChart $chart + * @param BudgetRepositoryInterface $repository + * @param $year * - * @return $this|\Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response */ - public function allBudgetsAndSpending($year, GChart $chart, BudgetRepositoryInterface $repository) + public function allBudgetsAndSpending(GChart $chart, BudgetRepositoryInterface $repository, $year) { $budgets = $repository->getBudgets(); $chart->addColumn('Month', 'date'); @@ -137,7 +140,8 @@ class GoogleChartController extends Controller } /** - * @param GChart $chart + * @param GChart $chart + * @param BudgetRepositoryInterface $repository * * @return \Symfony\Component\HttpFoundation\Response */ @@ -183,7 +187,8 @@ class GoogleChartController extends Controller } /** - * @param GChart $chart + * @param GChart $chart + * @param CategoryRepositoryInterface $repository * * @return \Symfony\Component\HttpFoundation\Response */ @@ -210,12 +215,13 @@ class GoogleChartController extends Controller } /** - * @param Bill $bill - * @param GChart $chart + * @param GChart $chart + * @param BillRepositoryInterface $repository + * @param Bill $bill * * @return \Symfony\Component\HttpFoundation\Response */ - public function billOverview(Bill $bill, GChart $chart, BillRepositoryInterface $repository) + public function billOverview(GChart $chart, BillRepositoryInterface $repository, Bill $bill) { $chart->addColumn('Date', 'date'); @@ -319,13 +325,14 @@ class GoogleChartController extends Controller } /** + * @param GChart $chart + * @param BudgetRepositoryInterface $repository + * @param Budget $budget + * @param LimitRepetition $repetition * - * @param Budget $budget - * @param LimitRepetition $repetition - * - * @return \Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response */ - public function budgetLimitSpending(Budget $budget, LimitRepetition $repetition, GChart $chart, BudgetRepositoryInterface $repository) + public function budgetLimitSpending(GChart $chart, BudgetRepositoryInterface $repository, Budget $budget, LimitRepetition $repetition) { $start = clone $repetition->startdate; $end = $repetition->enddate; @@ -352,10 +359,10 @@ class GoogleChartController extends Controller } /** - * @param Budget $budget - * @param int $year * @param GChart $chart * @param BudgetRepositoryInterface $repository + * @param Budget $budget + * @param int $year * * @return \Symfony\Component\HttpFoundation\Response */ @@ -389,12 +396,13 @@ class GoogleChartController extends Controller } /** + * @param GChart $chart + * @param CategoryRepositoryInterface $repository + * @param Category $category * - * @param Category $category - * - * @return \Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response */ - public function categoryOverviewChart(Category $category, GChart $chart, CategoryRepositoryInterface $repository) + public function categoryOverviewChart(GChart $chart, CategoryRepositoryInterface $repository, Category $category) { // oldest transaction in category: $start = $repository->getFirstActivityDate($category); @@ -425,12 +433,13 @@ class GoogleChartController extends Controller } /** + * @param GChart $chart + * @param CategoryRepositoryInterface $repository + * @param Category $category * - * @param Category $category - * - * @return \Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response */ - public function categoryPeriodChart(Category $category, GChart $chart, CategoryRepositoryInterface $repository) + public function categoryPeriodChart(GChart $chart, CategoryRepositoryInterface $repository, Category $category) { $start = clone Session::get('start', Carbon::now()->startOfMonth()); $chart->addColumn('Period', 'date'); @@ -452,11 +461,13 @@ class GoogleChartController extends Controller /** - * @param PiggyBank $piggyBank + * @param GChart $chart + * @param PiggyBankRepositoryInterface $repository + * @param PiggyBank $piggyBank * - * @return \Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response */ - public function piggyBankHistory(PiggyBank $piggyBank, GChart $chart, PiggyBankRepositoryInterface $repository) + public function piggyBankHistory(GChart $chart, PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank) { $chart->addColumn('Date', 'date'); $chart->addColumn('Balance', 'number'); @@ -477,12 +488,13 @@ class GoogleChartController extends Controller } /** + * @param GChart $chart + * @param ReportQueryInterface $query + * @param $year * - * @param $year - * - * @return \Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response */ - public function yearInExp($year, GChart $chart, ReportQueryInterface $query) + public function yearInExp(GChart $chart, ReportQueryInterface $query,$year) { $start = new Carbon('01-01-' . $year); $chart->addColumn('Month', 'date'); @@ -515,12 +527,13 @@ class GoogleChartController extends Controller } /** + * @param GChart $chart + * @param ReportQueryInterface $query + * @param $year * - * @param $year - * - * @return \Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response */ - public function yearInExpSum($year, GChart $chart, ReportQueryInterface $query) + public function yearInExpSum(GChart $chart, ReportQueryInterface $query, $year) { $start = new Carbon('01-01-' . $year); $chart->addColumn('Summary', 'string'); diff --git a/app/Http/Controllers/HelpController.php b/app/Http/Controllers/HelpController.php index d8072669a8..a1562e79cb 100644 --- a/app/Http/Controllers/HelpController.php +++ b/app/Http/Controllers/HelpController.php @@ -17,7 +17,7 @@ class HelpController extends Controller * * @return \Illuminate\Http\JsonResponse */ - public function show($route, HelpInterface $help) + public function show(HelpInterface $help, $route) { $content = [ 'text' => '

There is no help for this route!

', diff --git a/app/Http/Controllers/JsonController.php b/app/Http/Controllers/JsonController.php index a58356cfd7..08ac171b3b 100644 --- a/app/Http/Controllers/JsonController.php +++ b/app/Http/Controllers/JsonController.php @@ -236,11 +236,12 @@ class JsonController extends Controller } /** - * @param $what + * @param JournalRepositoryInterface $repository + * @param $what * * @return \Symfony\Component\HttpFoundation\Response */ - public function transactionJournals($what, JournalRepositoryInterface $repository) + public function transactionJournals(JournalRepositoryInterface $repository, $what) { $descriptions = []; $dbType = $repository->getTransactionType($what); diff --git a/app/Http/Controllers/PiggyBankController.php b/app/Http/Controllers/PiggyBankController.php index ffd878d59f..6acb521341 100644 --- a/app/Http/Controllers/PiggyBankController.php +++ b/app/Http/Controllers/PiggyBankController.php @@ -44,7 +44,7 @@ class PiggyBankController extends Controller * * @return $this */ - public function add(PiggyBank $piggyBank, AccountRepositoryInterface $repository) + public function add(AccountRepositoryInterface $repository, PiggyBank $piggyBank) { $leftOnAccount = $repository->leftOnAccount($piggyBank->account); $savedSoFar = $piggyBank->currentRelevantRep()->currentamount; @@ -92,11 +92,12 @@ class PiggyBankController extends Controller } /** - * @param PiggyBank $piggyBank + * @param PiggyBankRepositoryInterface $repository + * @param PiggyBank $piggyBank * * @return \Illuminate\Http\RedirectResponse */ - public function destroy(PiggyBank $piggyBank, PiggyBankRepositoryInterface $repository) + public function destroy(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank) { @@ -107,13 +108,12 @@ class PiggyBankController extends Controller } /** - * @SuppressWarnings("CyclomaticComplexity") // It's exactly 5. So I don't mind. + * @param AccountRepositoryInterface $repository + * @param PiggyBank $piggyBank * - * @param PiggyBank $piggyBank - * - * @return $this + * @return View */ - public function edit(PiggyBank $piggyBank, AccountRepositoryInterface $repository) + public function edit(AccountRepositoryInterface $repository, PiggyBank $piggyBank) { $periods = Config::get('firefly.piggy_bank_periods'); @@ -149,7 +149,10 @@ class PiggyBankController extends Controller } /** - * @return $this + * @param AccountRepositoryInterface $repository + * @param PiggyBankRepositoryInterface $piggyRepository + * + * @return View */ public function index(AccountRepositoryInterface $repository, PiggyBankRepositoryInterface $piggyRepository) { @@ -187,7 +190,7 @@ class PiggyBankController extends Controller } /** - * Allow user to order piggy banks. + * @param PiggyBankRepositoryInterface $repository */ public function order(PiggyBankRepositoryInterface $repository) { @@ -204,13 +207,13 @@ class PiggyBankController extends Controller } /** - * POST add money to piggy bank - * - * @param PiggyBank $piggyBank + * @param PiggyBankRepositoryInterface $repository + * @param AccountRepositoryInterface $accounts + * @param PiggyBank $piggyBank * * @return \Illuminate\Http\RedirectResponse */ - public function postAdd(PiggyBank $piggyBank, PiggyBankRepositoryInterface $repository, AccountRepositoryInterface $accounts) + public function postAdd(PiggyBankRepositoryInterface $repository, AccountRepositoryInterface $accounts, PiggyBank $piggyBank) { $amount = round(floatval(Input::get('amount')), 2); $leftOnAccount = $accounts->leftOnAccount($piggyBank->account); @@ -240,11 +243,12 @@ class PiggyBankController extends Controller } /** - * @param PiggyBank $piggyBank + * @param PiggyBankRepositoryInterface $repository + * @param PiggyBank $piggyBank * * @return \Illuminate\Http\RedirectResponse */ - public function postRemove(PiggyBank $piggyBank, PiggyBankRepositoryInterface $repository) + public function postRemove(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank) { $amount = floatval(Input::get('amount')); @@ -279,11 +283,12 @@ class PiggyBankController extends Controller } /** - * @param PiggyBank $piggyBank + * @param PiggyBankRepositoryInterface $repository + * @param PiggyBank $piggyBank * - * @return $this + * @return View */ - public function show(PiggyBank $piggyBank, PiggyBankRepositoryInterface $repository) + public function show(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank) { $events = $repository->getEvents($piggyBank); @@ -338,7 +343,7 @@ class PiggyBankController extends Controller * * @return $this */ - public function update(PiggyBank $piggyBank, PiggyBankRepositoryInterface $repository, PiggyBankFormRequest $request) + public function update(PiggyBankRepositoryInterface $repository, PiggyBankFormRequest $request, PiggyBank $piggyBank) { $piggyBankData = [ 'name' => $request->get('name'), diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index c0e5e23eb8..cf59e21d95 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -87,11 +87,12 @@ class TagController extends Controller } /** - * @param Tag $tag + * @param TagRepositoryInterface $repository + * @param Tag $tag * * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Tag $tag, TagRepositoryInterface $repository) + public function destroy(TagRepositoryInterface $repository,Tag $tag) { $tagName = $tag->tag; @@ -273,9 +274,13 @@ class TagController extends Controller } /** - * @param Tag $tag + * @param TagFormRequest $request + * @param TagRepositoryInterface $repository + * @param Tag $tag + * + * @return $this|\Illuminate\Http\RedirectResponse */ - public function update(Tag $tag, TagFormRequest $request, TagRepositoryInterface $repository) + public function update(TagFormRequest $request, TagRepositoryInterface $repository, Tag $tag) { if (Input::get('setTag') == 'true') { $latitude = strlen($request->get('latitude')) > 0 ? $request->get('latitude') : null; diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index 3621bd0440..f5139cb617 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -116,7 +116,7 @@ class TransactionController extends Controller * * @return $this */ - public function edit(TransactionJournal $journal, JournalRepositoryInterface $repository) + public function edit(TransactionJournal $journal) { $what = strtolower($journal->transactiontype->type); $accounts = ExpandedForm::makeSelectList( @@ -310,13 +310,13 @@ class TransactionController extends Controller } /** - * @param TransactionJournal $journal + * @param JournalFormRequest $request + * @param JournalRepositoryInterface $repository + * @param TransactionJournal $journal * - * @SuppressWarnings("CyclomaticComplexity") // It's exactly 5. So I don't mind. - * - * @return $this + * @return $this|\Illuminate\Http\RedirectResponse */ - public function update(TransactionJournal $journal, JournalFormRequest $request, JournalRepositoryInterface $repository) + public function update(JournalFormRequest $request, JournalRepositoryInterface $repository, TransactionJournal $journal) { $journalData = $request->getJournalData(); diff --git a/tests/controllers/ReportControllerTest.php b/tests/controllers/ReportControllerTest.php index 1a13e9d3af..f75204ef6e 100644 --- a/tests/controllers/ReportControllerTest.php +++ b/tests/controllers/ReportControllerTest.php @@ -14,7 +14,6 @@ class ReportControllerTest extends TestCase public function setUp() { parent::setUp(); - FactoryMuffin::create('FireflyIII\User'); } /**