mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Various cleanup and spelling fixes.
This commit is contained in:
parent
230bd6e40a
commit
1659904f81
@ -61,6 +61,8 @@ class CurrencyController extends BaseController
|
||||
|
||||
/**
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
|
||||
*/
|
||||
public function delete(TransactionCurrency $currency)
|
||||
{
|
||||
@ -74,6 +76,11 @@ class CurrencyController extends BaseController
|
||||
return View::make('currency.delete', compact('currency'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function destroy(TransactionCurrency $currency)
|
||||
{
|
||||
Session::flash('success', 'Currency "' . e($currency->name) . '" deleted');
|
||||
@ -98,6 +105,9 @@ class CurrencyController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$currencies = $this->_repository->get();
|
||||
@ -112,6 +122,9 @@ class CurrencyController extends BaseController
|
||||
return View::make('currency.index', compact('currencies', 'defaultCurrency'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function store()
|
||||
{
|
||||
$data = Input::except('_token');
|
||||
@ -143,6 +156,11 @@ class CurrencyController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return $this|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function update(TransactionCurrency $currency)
|
||||
{
|
||||
$data = Input::except('_token');
|
||||
|
@ -235,8 +235,8 @@ class GoogleChartController extends BaseController
|
||||
return View::make('error')->with('message', 'Invalid year.');
|
||||
}
|
||||
|
||||
/** @var \FireflyIII\Database\Budget\Budget $repos */
|
||||
$repos = App::make('FireflyIII\Database\Budget\Budget');
|
||||
/** @var \FireflyIII\Database\Budget\Budget $budgetRepository */
|
||||
$budgetRepository = App::make('FireflyIII\Database\Budget\Budget');
|
||||
|
||||
$this->_chart->addColumn('Month', 'date');
|
||||
$this->_chart->addColumn('Budgeted', 'number');
|
||||
@ -246,8 +246,8 @@ class GoogleChartController extends BaseController
|
||||
$end = clone $start;
|
||||
$end->endOfYear();
|
||||
while ($start <= $end) {
|
||||
$spent = $repos->spentInMonth($component, $start);
|
||||
$repetition = $repos->repetitionOnStartingOnDate($component, $start);
|
||||
$spent = $budgetRepository->spentInMonth($component, $start);
|
||||
$repetition = $budgetRepository->repetitionOnStartingOnDate($component, $start);
|
||||
if ($repetition) {
|
||||
$budgeted = floatval($repetition->amount);
|
||||
} else {
|
||||
@ -283,8 +283,8 @@ class GoogleChartController extends BaseController
|
||||
return View::make('error')->with('message', 'Invalid year.');
|
||||
}
|
||||
|
||||
/** @var \FireflyIII\Database\Category\Category $repos */
|
||||
$repos = App::make('FireflyIII\Database\Category\Category');
|
||||
/** @var \FireflyIII\Database\Category\Category $categoryRepository */
|
||||
$categoryRepository = App::make('FireflyIII\Database\Category\Category');
|
||||
|
||||
$this->_chart->addColumn('Month', 'date');
|
||||
$this->_chart->addColumn('Budgeted', 'number');
|
||||
@ -295,7 +295,7 @@ class GoogleChartController extends BaseController
|
||||
$end->endOfYear();
|
||||
while ($start <= $end) {
|
||||
|
||||
$spent = $repos->spentInMonth($component, $start);
|
||||
$spent = $categoryRepository->spentInMonth($component, $start);
|
||||
$budgeted = null;
|
||||
|
||||
$this->_chart->addRow(clone $start, $budgeted, $spent);
|
||||
|
@ -26,8 +26,8 @@ class HomeController extends BaseController
|
||||
/** @var \FireflyIII\Database\Account\Account $acct */
|
||||
$acct = App::make('FireflyIII\Database\Account\Account');
|
||||
|
||||
/** @var \FireflyIII\Database\TransactionJournal\TransactionJournal $jrnls */
|
||||
$jrnls = App::make('FireflyIII\Database\TransactionJournal\TransactionJournal');
|
||||
/** @var \FireflyIII\Database\TransactionJournal\TransactionJournal $journalRepository */
|
||||
$journalRepository = App::make('FireflyIII\Database\TransactionJournal\TransactionJournal');
|
||||
|
||||
/** @var \FireflyIII\Shared\Preferences\PreferencesInterface $preferences */
|
||||
$preferences = App::make('FireflyIII\Shared\Preferences\PreferencesInterface');
|
||||
@ -39,16 +39,16 @@ class HomeController extends BaseController
|
||||
|
||||
|
||||
// get the preference for the home accounts to show:
|
||||
$frontpage = $preferences->get('frontPageAccounts', []);
|
||||
if ($frontpage->data == []) {
|
||||
$frontPage = $preferences->get('frontPageAccounts', []);
|
||||
if ($frontPage->data == []) {
|
||||
$accounts = $acct->getAssetAccounts();
|
||||
} else {
|
||||
$accounts = $acct->getByIds($frontpage->data);
|
||||
$accounts = $acct->getByIds($frontPage->data);
|
||||
}
|
||||
|
||||
$transactions = [];
|
||||
foreach ($accounts as $account) {
|
||||
$set = $jrnls->getInDateRangeAccount($account, $start, $end, 10);
|
||||
$set = $journalRepository->getInDateRangeAccount($account, $start, $end, 10);
|
||||
if (count($set) > 0) {
|
||||
$transactions[] = [$set, $account];
|
||||
}
|
||||
|
@ -42,9 +42,9 @@ class PiggyBankController extends BaseController
|
||||
public function add(PiggyBank $piggyBank)
|
||||
{
|
||||
$leftOnAccount = $this->_repository->leftOnAccount($piggyBank->account);
|
||||
$savedSoFar = $piggyBank->currentRelevantRep()->currentamount;
|
||||
$leftToSave = $piggyBank->targetamount - $savedSoFar;
|
||||
$maxAmount = min($leftOnAccount, $leftToSave);
|
||||
$savedSoFar = $piggyBank->currentRelevantRep()->currentamount;
|
||||
$leftToSave = $piggyBank->targetamount - $savedSoFar;
|
||||
$maxAmount = min($leftOnAccount, $leftToSave);
|
||||
|
||||
|
||||
\Log::debug('Now going to view for piggy bank #' . $piggyBank->id . ' (' . $piggyBank->name . ')');
|
||||
@ -182,9 +182,9 @@ class PiggyBankController extends BaseController
|
||||
$amount = round(floatval(Input::get('amount')), 2);
|
||||
|
||||
/** @var \FireflyIII\Database\PiggyBank\PiggyBank $acct */
|
||||
$repos = App::make('FireflyIII\Database\PiggyBank\PiggyBank');
|
||||
$piggyRepository = App::make('FireflyIII\Database\PiggyBank\PiggyBank');
|
||||
|
||||
$leftOnAccount = $repos->leftOnAccount($piggyBank->account);
|
||||
$leftOnAccount = $piggyRepository->leftOnAccount($piggyBank->account);
|
||||
$savedSoFar = $piggyBank->currentRelevantRep()->currentamount;
|
||||
$leftToSave = $piggyBank->targetamount - $savedSoFar;
|
||||
$maxAmount = round(min($leftOnAccount, $leftToSave), 2);
|
||||
@ -243,7 +243,7 @@ class PiggyBankController extends BaseController
|
||||
*/
|
||||
public function remove(PiggyBank $piggyBank)
|
||||
{
|
||||
return View::make('piggy_banks.remove',compact('piggyBank'));
|
||||
return View::make('piggy_banks.remove', compact('piggyBank'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @SuppressWarnings("CyclomaticComplexity") // It's all 5. So ok.
|
||||
*
|
||||
* Class ProfileController
|
||||
*/
|
||||
class ProfileController extends BaseController
|
||||
|
@ -3,6 +3,10 @@ use FireflyIII\Database\RecurringTransaction\RecurringTransaction as Repository;
|
||||
use FireflyIII\Exception\FireflyException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @SuppressWarnings("CamelCase") // I'm fine with this.
|
||||
* @SuppressWarnings("CyclomaticComplexity") // It's all 5. So ok.
|
||||
* @SuppressWarnings("NPathComplexity")
|
||||
* Class RecurringController
|
||||
*
|
||||
*/
|
||||
@ -114,7 +118,7 @@ class RecurringController extends BaseController
|
||||
$hideRecurring = true;
|
||||
|
||||
|
||||
return View::make('recurring.show', compact('journals', 'hideRecurring', 'finalDate'))->with('recurring', $recurringTransaction)->with(
|
||||
return View::make('recurring.show', compact('journals', 'hideRecurring'))->with('recurring', $recurringTransaction)->with(
|
||||
'subTitle', $recurringTransaction->name
|
||||
);
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace FireflyIII\Shared\Toolkit;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class Form
|
||||
@ -14,12 +13,12 @@ class Form
|
||||
/**
|
||||
* Takes any collection and tries to make a sensible select list compatible array of it.
|
||||
*
|
||||
* @param Collection $set
|
||||
* @param bool $addEmpty
|
||||
* @param \Illuminate\Support\Collection $set
|
||||
* @param bool $addEmpty
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function makeSelectList(Collection $set, $addEmpty = false)
|
||||
public function makeSelectList(\Illuminate\Support\Collection $set, $addEmpty = false)
|
||||
{
|
||||
$selectList = [];
|
||||
if ($addEmpty) {
|
||||
|
Loading…
Reference in New Issue
Block a user