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

@@ -88,7 +88,7 @@ class ExpenseReportController extends Controller
$cache->addProperty($start);
$cache->addProperty($end);
if ($cache->has()) {
return response()->json($cache->get()); // @codeCoverageIgnore
return response()->json($cache->get());
}
$format = app('navigation')->preferredCarbonLocalizedFormat($start, $end);
@@ -184,11 +184,11 @@ class ExpenseReportController extends Controller
$newSet = [];
foreach ($chartData as $key => $entry) {
if (0 === !array_sum($entry['entries'])) {
$newSet[$key] = $chartData[$key]; // @codeCoverageIgnore
$newSet[$key] = $chartData[$key];
}
}
if (empty($newSet)) {
$newSet = $chartData; // @codeCoverageIgnore
if (0===count($newSet)) {
$newSet = $chartData;
}
$data = $this->generator->multiSet($newSet);
$cache->store($data);