mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 14:48:11 +00:00
Various code cleanup and fixed alignments.
This commit is contained in:
@@ -75,11 +75,11 @@ class IndexController extends Controller
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$page = 0 === (int)$request->get('page') ? 1 : (int)$request->get('page');
|
||||
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
|
||||
$collection = $this->recurringRepos->get();
|
||||
$today = today(config('app.timezone'));
|
||||
$year = today(config('app.timezone'));
|
||||
$page = 0 === (int)$request->get('page') ? 1 : (int)$request->get('page');
|
||||
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
|
||||
$collection = $this->recurringRepos->get();
|
||||
$today = today(config('app.timezone'));
|
||||
$year = today(config('app.timezone'));
|
||||
|
||||
// split collection
|
||||
$total = $collection->count();
|
||||
@@ -89,7 +89,7 @@ class IndexController extends Controller
|
||||
$transformer = app(RecurrenceTransformer::class);
|
||||
$transformer->setParameters(new ParameterBag());
|
||||
|
||||
$recurring = [];
|
||||
$recurring = [];
|
||||
|
||||
/** @var Recurrence $recurrence */
|
||||
foreach ($recurrences as $recurrence) {
|
||||
@@ -104,7 +104,7 @@ class IndexController extends Controller
|
||||
$array['repeat_until'] = null === $array['repeat_until'] ? null : new Carbon($array['repeat_until']);
|
||||
$array['latest_date'] = null === $array['latest_date'] ? null : new Carbon($array['latest_date']);
|
||||
// lazy but OK
|
||||
$array['attachments'] = $recurrence->attachments()->count();
|
||||
$array['attachments'] = $recurrence->attachments()->count();
|
||||
|
||||
// make carbon objects out of occurrences
|
||||
foreach ($array['repetitions'] as $repIndex => $repetition) {
|
||||
@@ -113,11 +113,11 @@ class IndexController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$recurring[] = $array;
|
||||
$recurring[] = $array;
|
||||
}
|
||||
$paginator = new LengthAwarePaginator($recurring, $total, $pageSize, $page);
|
||||
$paginator = new LengthAwarePaginator($recurring, $total, $pageSize, $page);
|
||||
$paginator->setPath(route('recurring.index'));
|
||||
$today = today(config('app.timezone'));
|
||||
$today = today(config('app.timezone'));
|
||||
|
||||
$this->verifyRecurringCronJob();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user