mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-08-27 05:37:20 -05:00
Fix code quality with rector [skip ci]
This commit is contained in:
@@ -57,7 +57,7 @@ class CreateController extends Controller
|
||||
*
|
||||
* @return Factory|View
|
||||
*/
|
||||
public function index()
|
||||
public function index(): Factory|\Illuminate\Contracts\View\View
|
||||
{
|
||||
if (false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->warning('User visits webhook create page, but webhooks are DISABLED.');
|
||||
@@ -67,6 +67,6 @@ class CreateController extends Controller
|
||||
Log::channel('audit')->info('User visits webhook create page.');
|
||||
$previousUrl = $this->rememberPreviousUrl('webhooks.create.url');
|
||||
|
||||
return view('webhooks.create', compact('previousUrl'));
|
||||
return view('webhooks.create', ['previousUrl' => $previousUrl]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class DeleteController extends Controller
|
||||
*
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function index(Webhook $webhook)
|
||||
public function index(Webhook $webhook): Factory|View
|
||||
{
|
||||
if (false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->warning('User visits webhook delete page, but webhooks are DISABLED.');
|
||||
@@ -73,6 +73,6 @@ class DeleteController extends Controller
|
||||
$subTitle = (string) trans('firefly.delete_webhook', ['title' => $webhook->title]);
|
||||
$this->rememberPreviousUrl('webhooks.delete.url');
|
||||
|
||||
return view('webhooks.delete', compact('webhook', 'subTitle'));
|
||||
return view('webhooks.delete', ['webhook' => $webhook, 'subTitle' => $subTitle]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class EditController extends Controller
|
||||
*
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function index(Webhook $webhook)
|
||||
public function index(Webhook $webhook): Factory|View
|
||||
{
|
||||
if (false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->warning('User visits webhook edit page, but webhooks are DISABLED.');
|
||||
@@ -72,6 +72,6 @@ class EditController extends Controller
|
||||
$subTitle = (string) trans('firefly.edit_webhook', ['title' => $webhook->title]);
|
||||
$this->rememberPreviousUrl('webhooks.edit.url');
|
||||
|
||||
return view('webhooks.edit', compact('webhook', 'subTitle'));
|
||||
return view('webhooks.edit', ['webhook' => $webhook, 'subTitle' => $subTitle]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class IndexController extends Controller
|
||||
/**
|
||||
* @return Factory|View
|
||||
*/
|
||||
public function index()
|
||||
public function index(): Factory|\Illuminate\Contracts\View\View
|
||||
{
|
||||
if (false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->warning('User visits webhook index page, but webhooks are DISABLED.');
|
||||
|
||||
@@ -61,7 +61,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function index(Webhook $webhook)
|
||||
public function index(Webhook $webhook): Factory|View
|
||||
{
|
||||
if (false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->warning(sprintf('User visits webhook #%d page, but webhooks are DISABLED.', $webhook->id));
|
||||
@@ -71,6 +71,6 @@ class ShowController extends Controller
|
||||
Log::channel('audit')->info(sprintf('User visits webhook #%d page.', $webhook->id));
|
||||
$subTitle = (string) trans('firefly.show_webhook', ['title' => $webhook->title]);
|
||||
|
||||
return view('webhooks.show', compact('webhook', 'subTitle'));
|
||||
return view('webhooks.show', ['webhook' => $webhook, 'subTitle' => $subTitle]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user