mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 19:01:58 +00:00
Some minor code cleanup.
This commit is contained in:
@@ -14,8 +14,8 @@ use FireflyIII\Helpers\Collection\Balance;
|
||||
use FireflyIII\Helpers\Collection\BalanceEntry;
|
||||
use FireflyIII\Helpers\Collection\BalanceHeader;
|
||||
use FireflyIII\Helpers\Collection\BalanceLine;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Budget as BudgetModel;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
@@ -41,11 +41,10 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param ReportQueryInterface $query
|
||||
* @param BudgetRepositoryInterface $budgetRepository
|
||||
* @param TagRepositoryInterface $tagRepository
|
||||
*/
|
||||
public function __construct(ReportQueryInterface $query, BudgetRepositoryInterface $budgetRepository, TagRepositoryInterface $tagRepository)
|
||||
public function __construct(BudgetRepositoryInterface $budgetRepository, TagRepositoryInterface $tagRepository)
|
||||
{
|
||||
$this->budgetRepository = $budgetRepository;
|
||||
$this->tagRepository = $tagRepository;
|
||||
|
@@ -344,7 +344,7 @@ class CategoryController extends Controller
|
||||
$row = [clone $start];
|
||||
$currentSet = $set->filter( // get possibly relevant entries from the big $set
|
||||
function (Category $category) use ($start) {
|
||||
return $category->dateFormatted == $start->format("Y-m");
|
||||
return $category->dateFormatted == $start->format('Y-m');
|
||||
}
|
||||
);
|
||||
/** @var Category $category */
|
||||
@@ -410,7 +410,7 @@ class CategoryController extends Controller
|
||||
$row = [clone $start];
|
||||
$currentSet = $set->filter(// get possibly relevant entries from the big $set
|
||||
function (Category $category) use ($start) {
|
||||
return $category->dateFormatted == $start->format("Y-m");
|
||||
return $category->dateFormatted == $start->format('Y-m');
|
||||
}
|
||||
);
|
||||
/** @var Category $category */
|
||||
|
@@ -45,7 +45,10 @@ class PreferencesController extends Controller
|
||||
|
||||
$showIncomplete = env('SHOW_INCOMPLETE_TRANSLATIONS', 'false') == 'true';
|
||||
|
||||
return view('preferences.index', compact('budgetMaximum', 'language', 'accounts', 'frontPageAccounts', 'viewRange', 'customFiscalYear', 'fiscalYearStart', 'showIncomplete'));
|
||||
return view(
|
||||
'preferences.index',
|
||||
compact('budgetMaximum', 'language', 'accounts', 'frontPageAccounts', 'viewRange', 'customFiscalYear', 'fiscalYearStart', 'showIncomplete')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,7 +77,7 @@ class PreferencesController extends Controller
|
||||
Preferences::set('budgetMaximum', $budgetMaximum);
|
||||
|
||||
// custom fiscal year
|
||||
$customFiscalYear = (int) Input::get('customFiscalYear');
|
||||
$customFiscalYear = (int)Input::get('customFiscalYear');
|
||||
Preferences::set('customFiscalYear', $customFiscalYear);
|
||||
$fiscalYearStart = date('m-d', strtotime(Input::get('fiscalYearStart')));
|
||||
Preferences::set('fiscalYearStart', $fiscalYearStart);
|
||||
|
@@ -56,12 +56,12 @@ class ReportController extends Controller
|
||||
$expenseTopLength = 8;
|
||||
|
||||
// get report stuff!
|
||||
$accountReport = $this->accountHelper->getAccountReport($start, $end, $accounts); // done (+2)
|
||||
$incomes = $this->helper->getIncomeReport($start, $end, $accounts); // done (+3)
|
||||
$expenses = $this->helper->getExpenseReport($start, $end, $accounts); // done (+1)
|
||||
$budgets = $this->budgetHelper->getBudgetReport($start, $end, $accounts); // done (+5)
|
||||
$categories = $this->helper->getCategoryReport($start, $end, $accounts); // done (+1) (20)
|
||||
$balance = $this->balanceHelper->getBalanceReport($start, $end, $accounts); // +566
|
||||
$accountReport = $this->accountHelper->getAccountReport($start, $end, $accounts);
|
||||
$incomes = $this->helper->getIncomeReport($start, $end, $accounts);
|
||||
$expenses = $this->helper->getExpenseReport($start, $end, $accounts);
|
||||
$budgets = $this->budgetHelper->getBudgetReport($start, $end, $accounts);
|
||||
$categories = $this->helper->getCategoryReport($start, $end, $accounts);
|
||||
$balance = $this->balanceHelper->getBalanceReport($start, $end, $accounts);
|
||||
$bills = $this->helper->getBillReport($start, $end, $accounts);
|
||||
|
||||
// and some id's, joined:
|
||||
@@ -99,9 +99,9 @@ class ReportController extends Controller
|
||||
// list of users stuff:
|
||||
$budgets = app('FireflyIII\Repositories\Budget\BudgetRepositoryInterface')->getActiveBudgets();
|
||||
$categories = app('FireflyIII\Repositories\Category\CategoryRepositoryInterface')->listCategories();
|
||||
$accountReport = $this->accountHelper->getAccountReport($start, $end, $accounts); // done (+2)
|
||||
$incomes = $this->helper->getIncomeReport($start, $end, $accounts); // done (+3)
|
||||
$expenses = $this->helper->getExpenseReport($start, $end, $accounts); // done (+1)
|
||||
$accountReport = $this->accountHelper->getAccountReport($start, $end, $accounts);
|
||||
$incomes = $this->helper->getIncomeReport($start, $end, $accounts);
|
||||
$expenses = $this->helper->getExpenseReport($start, $end, $accounts);
|
||||
|
||||
// and some id's, joined:
|
||||
$accountIds = [];
|
||||
|
@@ -446,6 +446,7 @@ class RuleController extends Controller
|
||||
{
|
||||
$newIndex = 0;
|
||||
$actions = [];
|
||||
if (is_array(Input::old('rule-action'))) {
|
||||
foreach (Input::old('rule-action') as $index => $entry) {
|
||||
$count = ($newIndex + 1);
|
||||
$checked = isset(Input::old('rule-action-stop')[$index]) ? true : false;
|
||||
@@ -460,6 +461,7 @@ class RuleController extends Controller
|
||||
)->render();
|
||||
$newIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
return $actions;
|
||||
}
|
||||
@@ -471,6 +473,7 @@ class RuleController extends Controller
|
||||
{
|
||||
$newIndex = 0;
|
||||
$triggers = [];
|
||||
if (is_array(Input::old('rule-trigger'))) {
|
||||
foreach (Input::old('rule-trigger') as $index => $entry) {
|
||||
$count = ($newIndex + 1);
|
||||
$oldChecked = isset(Input::old('rule-trigger-stop')[$index]) ? true : false;
|
||||
@@ -485,6 +488,7 @@ class RuleController extends Controller
|
||||
)->render();
|
||||
$newIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
return $triggers;
|
||||
}
|
||||
|
@@ -40,8 +40,6 @@ class Binder
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
||||
//return $next($request);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -21,7 +21,6 @@ Route::group(
|
||||
Route::post('/password/reset', 'Auth\PasswordController@reset');
|
||||
|
||||
|
||||
//Route::get('/home', 'HomeController@index');
|
||||
}
|
||||
);
|
||||
|
||||
|
@@ -77,7 +77,7 @@ class Amount
|
||||
}
|
||||
|
||||
if ($journal->isTransfer() && $coloured) {
|
||||
$txt = '<span class="text-info">' . $this->formatAnything($journal->transactionCurrency, $journal->amount_positive, false) . '</span>';;
|
||||
$txt = '<span class="text-info">' . $this->formatAnything($journal->transactionCurrency, $journal->amount_positive, false) . '</span>';
|
||||
$cache->store($txt);
|
||||
|
||||
return $txt;
|
||||
|
Reference in New Issue
Block a user