From 3d1d2dcfbc5eb13cfd73afd8f04624ea635e5138 Mon Sep 17 00:00:00 2001 From: Kyrch Date: Mon, 22 Dec 2025 17:51:37 -0300 Subject: [PATCH] docs: fixed failed static analysis in lvl 6 (#1029) --- app/Filament/RelationManagers/BaseRelationManager.php | 1 + app/Filament/Resources/Base/BaseViewResource.php | 1 + app/Http/Middleware/GraphQL/SetServingGraphQL.php | 2 +- app/Pivots/Morph/Imageable.php | 2 +- app/Pivots/Morph/Resourceable.php | 4 +++- app/Policies/List/External/ExternalEntryPolicy.php | 3 +++ app/Policies/List/Playlist/PlaylistTrackPolicy.php | 6 ++++++ 7 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/Filament/RelationManagers/BaseRelationManager.php b/app/Filament/RelationManagers/BaseRelationManager.php index d78f81495..dc0e54e39 100644 --- a/app/Filament/RelationManagers/BaseRelationManager.php +++ b/app/Filament/RelationManagers/BaseRelationManager.php @@ -30,6 +30,7 @@ abstract class BaseRelationManager extends RelationManager { protected static bool $isLazy = false; + /** @var array */ protected $listeners = ['updateAllRelationManager' => '$refresh']; /** diff --git a/app/Filament/Resources/Base/BaseViewResource.php b/app/Filament/Resources/Base/BaseViewResource.php index 38eab1118..c9e30b0f6 100644 --- a/app/Filament/Resources/Base/BaseViewResource.php +++ b/app/Filament/Resources/Base/BaseViewResource.php @@ -11,6 +11,7 @@ class BaseViewResource extends ViewRecord { use HasRecentHistoryRecorder; + /** @var array */ protected $listeners = [ 'updateAllRelationManager' => '$refresh', ]; diff --git a/app/Http/Middleware/GraphQL/SetServingGraphQL.php b/app/Http/Middleware/GraphQL/SetServingGraphQL.php index 32bf66918..cecd8792e 100644 --- a/app/Http/Middleware/GraphQL/SetServingGraphQL.php +++ b/app/Http/Middleware/GraphQL/SetServingGraphQL.php @@ -9,7 +9,7 @@ use Illuminate\Http\Request; class SetServingGraphQL { - public static $isServing = false; + public static bool $isServing = false; /** * @param Closure(Request): mixed $next diff --git a/app/Pivots/Morph/Imageable.php b/app/Pivots/Morph/Imageable.php index bc9c94c08..c2721587d 100644 --- a/app/Pivots/Morph/Imageable.php +++ b/app/Pivots/Morph/Imageable.php @@ -45,7 +45,7 @@ class Imageable extends BaseMorphPivot /** * The models that have images. * - * @return class-string + * @var class-string[] */ public static $imageables = [ Playlist::class, diff --git a/app/Pivots/Morph/Resourceable.php b/app/Pivots/Morph/Resourceable.php index 7ab3c28d9..e80bdbff8 100644 --- a/app/Pivots/Morph/Resourceable.php +++ b/app/Pivots/Morph/Resourceable.php @@ -46,7 +46,7 @@ class Resourceable extends BaseMorphPivot /** * The models that have resources. * - * @return class-string + * @var class-string[] */ public static $resourceables = [ Anime::class, @@ -114,6 +114,8 @@ class Resourceable extends BaseMorphPivot /** * Gets the model that owns the resourceable. + * + * @return MorphTo */ public function resourceable(): MorphTo { diff --git a/app/Policies/List/External/ExternalEntryPolicy.php b/app/Policies/List/External/ExternalEntryPolicy.php index aafe137ae..0919f0d4f 100644 --- a/app/Policies/List/External/ExternalEntryPolicy.php +++ b/app/Policies/List/External/ExternalEntryPolicy.php @@ -17,6 +17,9 @@ use Illuminate\Database\Eloquent\Model; class ExternalEntryPolicy extends BasePolicy { + /** + * @param ExternalProfile $profile + */ public function viewAny(?User $user, $profile = null): Response { if (Filament::isServing()) { diff --git a/app/Policies/List/Playlist/PlaylistTrackPolicy.php b/app/Policies/List/Playlist/PlaylistTrackPolicy.php index 5318ae891..fa2038697 100644 --- a/app/Policies/List/Playlist/PlaylistTrackPolicy.php +++ b/app/Policies/List/Playlist/PlaylistTrackPolicy.php @@ -17,6 +17,9 @@ use Illuminate\Database\Eloquent\Model; class PlaylistTrackPolicy extends BasePolicy { + /** + * @param Playlist $playlist + */ public function viewAny(?User $user, $playlist = null): Response { if (Filament::isServing()) { @@ -63,6 +66,9 @@ class PlaylistTrackPolicy extends BasePolicy : Response::deny(); } + /** + * @param Playlist $playlist + */ public function create(User $user, $playlist = null): Response { if (Filament::isServing()) {