Various code cleanup.

This commit is contained in:
James Cole
2017-09-14 17:40:02 +02:00
parent 761e9effae
commit 5e900736f8
59 changed files with 315 additions and 1912 deletions

View File

@@ -399,7 +399,7 @@ class AccountController extends Controller
$start = Navigation::startOfPeriod($start, $range);
$end = Navigation::endOfX(new Carbon, $range, null);
$entries = new Collection;
$count = 0;
// properties for cache
$cache = new CacheProperties;
$cache->addProperty($start);
@@ -412,7 +412,7 @@ class AccountController extends Controller
}
Log::debug('Going to get period expenses and incomes.');
while ($end >= $start) {
while ($end >= $start && $count < 90) {
$end = Navigation::startOfPeriod($end, $range);
$currentEnd = Navigation::endOfPeriod($end, $range);
@@ -442,7 +442,7 @@ class AccountController extends Controller
'date' => clone $end]
);
$end = Navigation::subtractPeriod($end, $range, 1);
$count++;
}
$cache->store($entries);