Code cleanup

This commit is contained in:
James Cole
2018-04-28 06:23:13 +02:00
parent 6f0e1c79ac
commit 13b78bdc20
218 changed files with 621 additions and 681 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);