Various code cleanup.

This commit is contained in:
James Cole
2021-04-07 07:28:43 +02:00
parent 4ddcb0c965
commit f12744ad8c
180 changed files with 714 additions and 721 deletions

View File

@@ -72,7 +72,7 @@ class NetWorth implements NetWorthInterface
$cache->addProperty('net-worth-by-currency');
$cache->addProperty(implode(',', $accounts->pluck('id')->toArray()));
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
return $cache->get();
}
$netWorth = [];

View File

@@ -128,7 +128,7 @@ class ReportHelper implements ReportHelperInterface
while ($start <= $end) {
$year = $fiscalHelper->endOfFiscalYear($start)->year; // current year
if (!isset($months[$year])) {
if (!array_key_exists($year, $months)) {
$months[$year] = [
'fiscal_start' => $fiscalHelper->startOfFiscalYear($start)->format('Y-m-d'),
'fiscal_end' => $fiscalHelper->endOfFiscalYear($start)->format('Y-m-d'),