Some code cleanup.

This commit is contained in:
James Cole
2015-02-01 08:51:27 +01:00
parent 210d597a48
commit c2d2eb53e8
15 changed files with 232 additions and 189 deletions

View File

@@ -361,7 +361,6 @@ class GoogleChartController extends BaseController
$end->endOfYear();
}
while ($start <= $end) {
$spent = $budgetRepository->spentInMonth($budget, $start);
$repetition = $budgetRepository->repetitionOnStartingOnDate($budget, $start);

View File

@@ -313,6 +313,8 @@ class PiggyBankController extends BaseController
/**
* @param PiggyBank $piggyBank
*
* @SuppressWarnings("CyclomaticComplexity") // It's exactly 5. So I don't mind.
*
* @return $this
* @throws FireflyException
*/
@@ -327,7 +329,6 @@ class PiggyBankController extends BaseController
$data['user_id'] = Auth::user()->id;
$data['repeats'] = 0;
// always validate:
$messages = $this->_repository->validate($data);
Session::flash('warnings', $messages['warnings']);

View File

@@ -124,7 +124,7 @@ class ReportController extends BaseController
$mainTitleIcon = 'fa-line-chart';
$balances = $this->_repository->yearBalanceReport($date);
$groupedIncomes = $this->_repository->revenueGroupedByAccount($date, $end, 15);
$groupedIncomes = $this->_repository->revenueGroupedByAccount($date, $end);
$groupedExpenses = $this->_repository->expensesGroupedByAccount($date, $end, 15);
return View::make(

View File

@@ -242,7 +242,6 @@ class TransactionController extends BaseController
public function store($what)
{
$data = Input::except('_token');
$transactionType = $this->_repository->getJournalType($what);
$transactionCurrency = $this->_repository->getJournalCurrencyById(intval($data['amount_currency_id']));
$data['transaction_type_id'] = $transactionType->id;
@@ -284,6 +283,8 @@ class TransactionController extends BaseController
/**
* @param TransactionJournal $journal
*
* @SuppressWarnings("CyclomaticComplexity") // It's exactly 5. So I don't mind.
*
* @return $this
* @throws FireflyException
*/