Code cleanup and realign.

This commit is contained in:
James Cole
2018-08-06 19:14:30 +02:00
parent f7eef25fed
commit 5908c0ce8c
188 changed files with 1019 additions and 1031 deletions

View File

@@ -260,9 +260,9 @@ class TransactionController extends Controller
*/
private function getPeriodOverview(string $what, Carbon $date): Collection
{
$range = app('preferences')->get('viewRange', '1M')->data;
$first = $this->repository->firstNull();
$start = Carbon::now()->subYear();
$range = app('preferences')->get('viewRange', '1M')->data;
$first = $this->repository->firstNull();
$start = Carbon::now()->subYear();
$types = config('firefly.transactionTypesByWhat.' . $what);
$entries = new Collection;
if (null !== $first) {
@@ -289,9 +289,9 @@ class TransactionController extends Controller
/** @noinspection PhpUndefinedMethodInspection */
$entries->push(
[
'name' => $dateName,
'sums' => $sums,
'sum' => $sum,
'name' => $dateName,
'sums' => $sums,
'sum' => $sum,
'start' => $currentDate['start']->format('Y-m-d'),
'end' => $currentDate['end']->format('Y-m-d'),
]