mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-02 03:51:18 +00:00
Code cleanup
This commit is contained in:
@@ -228,7 +228,7 @@ class AccountController extends Controller
|
||||
Log::debug('Default set is ', $defaultSet);
|
||||
$frontPage = Preferences::get('frontPageAccounts', $defaultSet);
|
||||
Log::debug('Frontpage preference set is ', $frontPage->data);
|
||||
if (0 === count($frontPage->data)) {
|
||||
if (0 === \count($frontPage->data)) {
|
||||
$frontPage->data = $defaultSet;
|
||||
Log::debug('frontpage set is empty!');
|
||||
$frontPage->save();
|
||||
|
||||
@@ -180,7 +180,7 @@ class BudgetReportController extends Controller
|
||||
$chartData[$budget->id]['entries'][$label] = bcmul($currentExpenses, '-1');
|
||||
$chartData[$budget->id . '-sum']['entries'][$label] = bcmul($sumOfExpenses[$budget->id], '-1');
|
||||
|
||||
if (count($budgetLimits) > 0) {
|
||||
if (\count($budgetLimits) > 0) {
|
||||
$budgetLimitId = $budgetLimits->first()->id;
|
||||
$leftOfLimits[$budgetLimitId] = $leftOfLimits[$budgetLimitId] ?? (string)$budgetLimits->sum('amount');
|
||||
$leftOfLimits[$budgetLimitId] = bcadd($leftOfLimits[$budgetLimitId], $currentExpenses);
|
||||
|
||||
@@ -251,7 +251,7 @@ class CategoryReportController extends Controller
|
||||
$newSet[$key] = $chartData[$key];
|
||||
}
|
||||
}
|
||||
if (0 === count($newSet)) {
|
||||
if (0 === \count($newSet)) {
|
||||
$newSet = $chartData;
|
||||
}
|
||||
$data = $this->generator->multiSet($newSet);
|
||||
|
||||
@@ -173,7 +173,7 @@ class ExpenseReportController extends Controller
|
||||
$newSet[$key] = $chartData[$key];
|
||||
}
|
||||
}
|
||||
if (0 === count($newSet)) {
|
||||
if (0 === \count($newSet)) {
|
||||
$newSet = $chartData; // @codeCoverageIgnore
|
||||
}
|
||||
$data = $this->generator->multiSet($newSet);
|
||||
|
||||
@@ -245,7 +245,7 @@ class TagReportController extends Controller
|
||||
$newSet[$key] = $chartData[$key];
|
||||
}
|
||||
}
|
||||
if (0 === count($newSet)) {
|
||||
if (0 === \count($newSet)) {
|
||||
$newSet = $chartData; // @codeCoverageIgnore
|
||||
}
|
||||
$data = $this->generator->multiSet($newSet);
|
||||
|
||||
Reference in New Issue
Block a user