Use PSR-12 code style

This commit is contained in:
James Cole
2022-10-30 14:24:19 +01:00
parent 64ff5eed27
commit 2eebcb21f1
60 changed files with 103 additions and 158 deletions

View File

@@ -112,11 +112,9 @@ class CreateController extends Controller
$redirect = redirect(route('categories.index'));
if (1 === (int) $request->get('create_another')) {
$request->session()->put('categories.create.fromStore', true);
$redirect = redirect(route('categories.create'))->withInput();
}
return $redirect;

View File

@@ -39,7 +39,6 @@ use Illuminate\View\View;
*/
class EditController extends Controller
{
private AttachmentHelperInterface $attachments;
private CategoryRepositoryInterface $repository;
@@ -120,11 +119,9 @@ class EditController extends Controller
$redirect = redirect($this->getPreviousUrl('categories.edit.url'));
if (1 === (int) $request->get('return_to_edit')) {
$request->session()->put('categories.edit.fromUpdate', true);
$redirect = redirect(route('categories.edit', [$category->id]));
}
return $redirect;

View File

@@ -81,7 +81,7 @@ class IndexController extends Controller
$collection->each(
function (Category $category) {
$category->lastActivity = $this->repository->lastUseDate($category, new Collection);
$category->lastActivity = $this->repository->lastUseDate($category, new Collection());
}
);
@@ -91,5 +91,4 @@ class IndexController extends Controller
return view('categories.index', compact('categories'));
}
}

View File

@@ -125,13 +125,13 @@ class NoCategoryController extends Controller
// default values:
$start = null;
$end = null;
$periods = new Collection;
$periods = new Collection();
$page = (int) $request->get('page');
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
Log::debug('Start of noCategory()');
$subTitle = (string) trans('firefly.all_journals_without_category');
$first = $this->journalRepos->firstNull();
$start = null === $first ? new Carbon : $first->date;
$start = null === $first ? new Carbon() : $first->date;
$end = today(config('app.timezone'));
Log::debug(sprintf('Start for noCategory() is %s', $start->format('Y-m-d')));
Log::debug(sprintf('End for noCategory() is %s', $end->format('Y-m-d')));

View File

@@ -132,7 +132,7 @@ class ShowController extends Controller
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
$start = null;
$end = null;
$periods = new Collection;
$periods = new Collection();
$subTitle = (string) trans('firefly.all_journals_for_category', ['name' => $category->name]);
$first = $this->repository->firstUseDate($category);