Code reordering and reformatting. I should really start employing style CI.

This commit is contained in:
James Cole
2021-09-18 10:26:12 +02:00
parent 9b9d52e99f
commit 4003cea759
344 changed files with 2776 additions and 2605 deletions

View File

@@ -35,6 +35,7 @@ use FireflyIII\Support\Http\Controllers\BasicDataSupport;
use FireflyIII\Support\Http\Controllers\ChartGeneration;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Collection;
use JsonException;
use Log;
/**
@@ -68,7 +69,7 @@ class ReportController extends Controller
* @param Carbon $end
*
* @return JsonResponse
* @throws \JsonException
* @throws JsonException
*/
public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{
@@ -79,7 +80,7 @@ class ReportController extends Controller
$cache->addProperty(implode(',', $accounts->pluck('id')->toArray()));
$cache->addProperty($end);
if ($cache->has()) {
return response()->json($cache->get());
return response()->json($cache->get());
}
$locale = app('steam')->getLocale();
$current = clone $start;
@@ -103,7 +104,7 @@ class ReportController extends Controller
}
);
// See reference nr. 56
// See reference nr. 56
while ($current < $end) {
// get balances by date, grouped by currency.
@@ -143,7 +144,7 @@ class ReportController extends Controller
* @param Carbon $end
*
* @return JsonResponse
* @throws \JsonException
* @throws JsonException
*/
public function operations(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{
@@ -154,7 +155,7 @@ class ReportController extends Controller
$cache->addProperty($accounts);
$cache->addProperty($end);
if ($cache->has()) {
return response()->json($cache->get());
return response()->json($cache->get());
}
Log::debug('Going to do operations for accounts ', $accounts->pluck('id')->toArray());
$format = app('navigation')->preferredCarbonFormat($start, $end);