General cleanup.

This commit is contained in:
James Cole
2015-05-03 12:58:55 +02:00
parent bb84f7a434
commit 4a51176193
34 changed files with 147 additions and 62 deletions

View File

@@ -92,7 +92,7 @@ class AccountController extends Controller
*
* @return View
*/
public function edit(AccountRepositoryInterface $repository,Account $account)
public function edit(AccountRepositoryInterface $repository, Account $account)
{
$what = Config::get('firefly.shortNamesByFullName')[$account->accountType->type];

View File

@@ -264,10 +264,10 @@ class BudgetController extends Controller
*/
public function updateIncome()
{
$date = Session::get('start', Carbon::now()->startOfMonth())->format('FY');
$date = Session::get('start', Carbon::now()->startOfMonth())->format('FY');
$amount = Preferences::get('budgetIncomeTotal' . $date, 1000);
return view('budgets.income',compact('amount'));
return view('budgets.income', compact('amount'));
}
}

View File

@@ -97,8 +97,9 @@ class CategoryController extends Controller
}
/**
* @return $this
* @param CategoryRepositoryInterface $repository
*
* @return $this
*/
public function index(CategoryRepositoryInterface $repository)
{
@@ -114,6 +115,8 @@ class CategoryController extends Controller
}
/**
* @param CategoryRepositoryInterface $repository
*
* @return \Illuminate\View\View
*/
public function noCategory(CategoryRepositoryInterface $repository)

View File

@@ -133,6 +133,8 @@ class CurrencyController extends Controller
}
/**
* @param CurrencyRepositoryInterface $repository
*
* @return \Illuminate\View\View
*/
public function index(CurrencyRepositoryInterface $repository)
@@ -146,6 +148,9 @@ class CurrencyController extends Controller
/**
* @SuppressWarnings("CyclomaticComplexity") // It's exactly 5. So I don't mind.
*
* @param CurrencyFormRequest $request
* @param CurrencyRepositoryInterface $repository
*
* @return $this|\Illuminate\Http\RedirectResponse
*/
public function store(CurrencyFormRequest $request, CurrencyRepositoryInterface $repository)

View File

@@ -243,7 +243,10 @@ class GoogleChartController extends Controller
}
/**
* @param GChart $chart
* @param GChart $chart
*
* @param BillRepositoryInterface $repository
* @param AccountRepositoryInterface $accounts
*
* @return \Symfony\Component\HttpFoundation\Response
*/
@@ -494,7 +497,7 @@ class GoogleChartController extends Controller
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function yearInExp(GChart $chart, ReportQueryInterface $query,$year)
public function yearInExp(GChart $chart, ReportQueryInterface $query, $year)
{
$start = new Carbon('01-01-' . $year);
$chart->addColumn('Month', 'date');

View File

@@ -13,7 +13,8 @@ class HelpController extends Controller
{
/**
* @param $route
* @param HelpInterface $help
* @param $route
*
* @return \Illuminate\Http\JsonResponse
*/

View File

@@ -28,7 +28,9 @@ class JsonController extends Controller
/**
* @param BillRepositoryInterface $repository
* @param BillRepositoryInterface $repository
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Symfony\Component\HttpFoundation\Response
*/
@@ -149,6 +151,8 @@ class JsonController extends Controller
/**
* Returns a list of categories.
*
* @param CategoryRepositoryInterface $repository
*
* @return \Illuminate\Http\JsonResponse
*/
public function categories(CategoryRepositoryInterface $repository)
@@ -166,6 +170,8 @@ class JsonController extends Controller
/**
* Returns a JSON list of all beneficiaries.
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Illuminate\Http\JsonResponse
*/
public function expenseAccounts(AccountRepositoryInterface $accountRepository)
@@ -183,6 +189,8 @@ class JsonController extends Controller
/**
* Returns a JSON list of all beneficiaries.
*
* @param TagRepositoryInterface $tagRepository
*
* @return \Illuminate\Http\JsonResponse
*/
public function tags(TagRepositoryInterface $tagRepository)
@@ -198,6 +206,8 @@ class JsonController extends Controller
}
/**
* @param AccountRepositoryInterface $accountRepository
*
* @return \Illuminate\Http\JsonResponse
*/
public function revenueAccounts(AccountRepositoryInterface $accountRepository)

View File

@@ -40,7 +40,8 @@ class PiggyBankController extends Controller
/**
* Add money to piggy bank
*
* @param PiggyBank $piggyBank
* @param AccountRepositoryInterface $repository
* @param PiggyBank $piggyBank
*
* @return $this
*/
@@ -55,6 +56,8 @@ class PiggyBankController extends Controller
}
/**
* @param AccountRepositoryInterface $repository
*
* @return mixed
*/
public function create(AccountRepositoryInterface $repository)
@@ -337,10 +340,11 @@ class PiggyBankController extends Controller
}
/**
* @param PiggyBank $piggyBank
* @param PiggyBankRepositoryInterface $repository
* @param PiggyBankFormRequest $request
* @param PiggyBank $piggyBank
*
* @SuppressWarnings("CyclomaticComplexity") // It's exactly 5. So I don't mind.
*
* @return $this
*/
public function update(PiggyBankRepositoryInterface $repository, PiggyBankFormRequest $request, PiggyBank $piggyBank)

View File

@@ -26,6 +26,8 @@ class PreferencesController extends Controller
}
/**
* @param AccountRepositoryInterface $repository
*
* @return $this|\Illuminate\View\View
*/
public function index(AccountRepositoryInterface $repository)

View File

@@ -46,6 +46,8 @@ class ProfileController extends Controller
}
/**
* @param ProfileFormRequest $request
*
* @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
*/
public function postChangePassword(ProfileFormRequest $request)
@@ -91,7 +93,10 @@ class ProfileController extends Controller
}
/**
* @param DeleteAccountFormRequest $request
*
* @return \Illuminate\Http\RedirectResponse
* @throws \Exception
*/
public function postDeleteAccount(DeleteAccountFormRequest $request)
{

View File

@@ -1,7 +1,5 @@
<?php namespace FireflyIII\Http\Controllers;
use Auth;
use FireflyIII\Helpers\Reminders\ReminderHelperInterface;
use FireflyIII\Models\Reminder;
use FireflyIII\Repositories\Reminder\ReminderRepositoryInterface;
use Redirect;
@@ -19,6 +17,8 @@ class ReminderController extends Controller
/**
* @param Reminder $reminder
*
* @return \Illuminate\Http\RedirectResponse
*/
public function act(Reminder $reminder)
{
@@ -36,6 +36,8 @@ class ReminderController extends Controller
/**
* @param Reminder $reminder
*
* @return \Illuminate\Http\RedirectResponse
*/
public function dismiss(Reminder $reminder)
{
@@ -48,7 +50,9 @@ class ReminderController extends Controller
}
/**
* @param ReminderRepositoryInterface $repository
*
* @return \Illuminate\View\View
*/
public function index(ReminderRepositoryInterface $repository)
{
@@ -67,6 +71,8 @@ class ReminderController extends Controller
/**
* @param Reminder $reminder
*
* @return \Illuminate\View\View
*/
public function show(Reminder $reminder)
{

View File

@@ -1,7 +1,6 @@
<?php namespace FireflyIII\Http\Controllers;
use Carbon\Carbon;
use Exception;
use FireflyIII\Helpers\Report\ReportHelperInterface;
use FireflyIII\Helpers\Report\ReportQueryInterface;
use FireflyIII\Models\Account;
@@ -107,9 +106,9 @@ class ReportController extends Controller
}
/**
* @param ReportHelperInterface $helper
*
* @return View
* @internal param ReportHelperInterface $helper
*
*/
public function index()
{
@@ -144,12 +143,13 @@ class ReportController extends Controller
}
/**
* @param Account $account
* @param string $year
* @param string $month
* @param ReportQueryInterface $query
* @param Account $account
* @param string $year
* @param string $month
*
* @return View
* @internal param ReportQueryInterface $query
*
*/
public function modalLeftUnbalanced(Account $account, $year = '2014', $month = '1')
{
@@ -164,6 +164,8 @@ class ReportController extends Controller
if ($count == 0) {
return $journal;
}
return null;
}
);

View File

@@ -12,6 +12,10 @@ class SearchController extends Controller
{
/**
* Results always come in the form of an array [results, count, fullCount]
*
* @param SearchInterface $searcher
*
* @return $this
*/
public function index(SearchInterface $searcher)
{

View File

@@ -92,7 +92,7 @@ class TagController extends Controller
*
* @return \Illuminate\Http\RedirectResponse
*/
public function destroy(TagRepositoryInterface $repository,Tag $tag)
public function destroy(TagRepositoryInterface $repository, Tag $tag)
{
$tagName = $tag->tag;
@@ -150,7 +150,7 @@ class TagController extends Controller
$count++;
}
}
if($count > 1) {
if ($count > 1) {
$allowToAdvancePayment = false;
}
@@ -170,12 +170,12 @@ class TagController extends Controller
$count++;
}
}
if($count > 0) {
if ($count > 0) {
$allowToBalancingAct = false;
}
// edit tagoptions:
// edit tag options:
if ($allowToAdvancePayment === false) {
unset($tagOptions['advancePayment']);
}
@@ -195,6 +195,8 @@ class TagController extends Controller
/**
* @param $state
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function hideTagHelp($state)
{
@@ -234,7 +236,11 @@ class TagController extends Controller
}
/**
* @param TagFormRequest $request
* @param TagFormRequest $request
*
* @param TagRepositoryInterface $repository
*
* @return $this|\Illuminate\Http\RedirectResponse
*/
public function store(TagFormRequest $request, TagRepositoryInterface $repository)
{