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

@@ -54,7 +54,7 @@ class EditController 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);
$this->attachments = app(AttachmentHelperInterface::class);
@@ -74,7 +74,7 @@ class EditController extends Controller
*/
public function edit(Request $request, Category $category)
{
$subTitle = (string)trans('firefly.edit_category', ['name' => $category->name]);
$subTitle = (string) trans('firefly.edit_category', ['name' => $category->name]);
// put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('categories.edit.fromUpdate')) {
@@ -102,7 +102,7 @@ class EditController extends Controller
$data = $request->getCategoryData();
$this->repository->update($category, $data);
$request->session()->flash('success', (string)trans('firefly.updated_category', ['name' => $category->name]));
$request->session()->flash('success', (string) trans('firefly.updated_category', ['name' => $category->name]));
app('preferences')->mark();
// store new attachment(s):
@@ -111,7 +111,7 @@ class EditController extends Controller
$this->attachments->saveAttachmentsForModel($category, $files);
}
if (null !== $files && auth()->user()->hasRole('demo')) {
session()->flash('info', (string)trans('firefly.no_att_demo_user'));
session()->flash('info', (string) trans('firefly.no_att_demo_user'));
}
if (count($this->attachments->getMessages()->get('attachments')) > 0) {
@@ -119,7 +119,7 @@ class EditController extends Controller
}
$redirect = redirect($this->getPreviousUri('categories.edit.uri'));
if (1 === (int)$request->get('return_to_edit')) {
if (1 === (int) $request->get('return_to_edit')) {
$request->session()->put('categories.edit.fromUpdate', true);