From 2160216d04c3f846cbb6465b603687adca41fac1 Mon Sep 17 00:00:00 2001 From: ilestis Date: Sun, 5 Jan 2025 19:50:19 -0600 Subject: [PATCH] PHPStan --- app/Http/Controllers/Families/FamilyController.php | 3 +-- app/Http/Controllers/Items/EntityController.php | 1 - app/Http/Controllers/Settings/AccountController.php | 10 ---------- app/Traits/Controllers/HasDatagrid.php | 2 +- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/Families/FamilyController.php b/app/Http/Controllers/Families/FamilyController.php index 3f01108502..6ab321a271 100644 --- a/app/Http/Controllers/Families/FamilyController.php +++ b/app/Http/Controllers/Families/FamilyController.php @@ -28,8 +28,7 @@ public function index(Campaign $campaign, Family $family) $filters['parent'] = $family->id; } Datagrid::layout(\App\Renderers\Layouts\Family\Family::class) - ->route('families.families', $options) - ; + ->route('families.families', $options); $this->rows = $family ->descendants() diff --git a/app/Http/Controllers/Items/EntityController.php b/app/Http/Controllers/Items/EntityController.php index 31ecec8a13..ee1fa7a233 100644 --- a/app/Http/Controllers/Items/EntityController.php +++ b/app/Http/Controllers/Items/EntityController.php @@ -27,7 +27,6 @@ public function index(Campaign $campaign, Item $item) Datagrid::layout(\App\Renderers\Layouts\Item\Entity::class) ->route('items.inventories', $options); - // @phpstan-ignore-next-line $this->rows = $item ->entities() ->sort(request()->only(['o', 'k']), ['name' => 'asc']) diff --git a/app/Http/Controllers/Settings/AccountController.php b/app/Http/Controllers/Settings/AccountController.php index ee51eb0f39..afea4c06dd 100644 --- a/app/Http/Controllers/Settings/AccountController.php +++ b/app/Http/Controllers/Settings/AccountController.php @@ -28,9 +28,6 @@ public function __construct(DeletionService $deletionService) $this->deletionService = $deletionService; } - /** - * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View - */ public function index() { $user = auth()->user(); @@ -54,8 +51,6 @@ public function password(StoreSettingsAccount $request) ->with('success', __('settings.account.password_success')); } - /** - */ public function email(StoreSettingsAccountEmail $request) { if ($request->ajax()) { @@ -69,9 +64,6 @@ public function email(StoreSettingsAccountEmail $request) ->with('success', __('settings.account.email_success')); } - /** - * @return \Illuminate\Http\RedirectResponse - */ public function social(StoreSettingsAccountSocial $request) { if (empty(auth()->user()->provider)) { @@ -96,8 +88,6 @@ public function social(StoreSettingsAccountSocial $request) ->with('success', __('settings.account.social.success')); } - /** - */ public function destroy(DeleteSettingsAccount $request) { if ($request->ajax()) { diff --git a/app/Traits/Controllers/HasDatagrid.php b/app/Traits/Controllers/HasDatagrid.php index 0ebbc193c2..6b89f66ce4 100644 --- a/app/Traits/Controllers/HasDatagrid.php +++ b/app/Traits/Controllers/HasDatagrid.php @@ -3,7 +3,7 @@ namespace App\Traits\Controllers; use App\Facades\Datagrid; -use Illuminate\Pagination\LengthAwarePaginator; +use Illuminate\Contracts\Pagination\LengthAwarePaginator; trait HasDatagrid {