mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 14:48:11 +00:00
Code cleanup
This commit is contained in:
@@ -56,7 +56,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);
|
||||
|
||||
@@ -79,9 +79,9 @@ class ShowController extends Controller
|
||||
// @var Carbon $end
|
||||
$end ??= session('end', today(config('app.timezone'))->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) ?? today(config('app.timezone'))->startOfYear();
|
||||
$periods = $this->getCategoryPeriodOverview($category, $oldest, $end);
|
||||
$path = route('categories.show', [$category->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
||||
@@ -116,13 +116,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 */
|
||||
|
||||
Reference in New Issue
Block a user