Reformat various code.

This commit is contained in:
James Cole
2022-03-29 14:58:06 +02:00
parent 1209c4e76a
commit 29bed2547c
140 changed files with 1004 additions and 1010 deletions

View File

@@ -59,7 +59,7 @@ class ShowController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', (string)trans('firefly.categories'));
app('view')->share('title', (string) trans('firefly.categories'));
app('view')->share('mainTitleIcon', 'fa-bookmark');
$this->repository = app(CategoryRepositoryInterface::class);
@@ -86,9 +86,9 @@ class ShowController extends Controller
/** @var Carbon $end */
$end = $end ?? session('end', Carbon::now()->endOfMonth());
$subTitleIcon = 'fa-bookmark';
$page = (int)$request->get('page');
$page = (int) $request->get('page');
$attachments = $this->repository->getAttachments($category);
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
$oldest = $this->repository->firstUseDate($category) ?? Carbon::now()->startOfYear();
$periods = $this->getCategoryPeriodOverview($category, $oldest, $end);
$path = route('categories.show', [$category->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
@@ -123,13 +123,13 @@ class ShowController extends Controller
{
// default values:
$subTitleIcon = 'fa-bookmark';
$page = (int)$request->get('page');
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
$page = (int) $request->get('page');
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
$start = null;
$end = null;
$periods = new Collection;
$subTitle = (string)trans('firefly.all_journals_for_category', ['name' => $category->name]);
$subTitle = (string) trans('firefly.all_journals_for_category', ['name' => $category->name]);
$first = $this->repository->firstUseDate($category);
/** @var Carbon $start */
$start = $first ?? today(config('app.timezone'));