diff --git a/app/Nova/Resource.php b/app/Nova/Resource.php index 239ac1f1f..84d940d9e 100644 --- a/app/Nova/Resource.php +++ b/app/Nova/Resource.php @@ -30,7 +30,7 @@ abstract class Resource extends NovaResource * * @param \Laravel\Scout\Builder $query * - * @phan-suppress PhanUndeclaredConstantOfClass + * @phan-suppress PhanTypeExpectedObjectOrClassName */ public static function scoutQuery(NovaRequest $request, $query): Builder { diff --git a/app/Nova/User.php b/app/Nova/User.php index 195e002fa..8be3c1c28 100644 --- a/app/Nova/User.php +++ b/app/Nova/User.php @@ -849,7 +849,8 @@ private static function adminCanRun(NovaRequest $request): bool /** * Build a Scout search query for the given resource. * - * @param \Laravel\Scout\Builder $query + * @param \Laravel\Scout\Builder<\App\Models\User> $query + * @return \Laravel\Scout\Builder<\App\Models\User> */ public static function scoutQuery(NovaRequest $request, $query): \Laravel\Scout\Builder { diff --git a/phpstan.neon b/phpstan.neon index 15f760106..78b5c9d97 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -104,6 +104,8 @@ parameters: - '#Method App\\Nova\\Filters\\[a-zA-Z]+::apply\(\) return type with generic class Illuminate\\Database\\Eloquent\\Builder does not specify its types: TModelClass#' - '#Method App\\Nova\\Filters\\[a-zA-Z]+::options\(\) should return array but returns array\.#' - '#Method App\\Nova\\Metrics\\TotalCollections::query\(\) return type with generic class Illuminate\\Database\\Eloquent\\Builder does not specify its types: TModelClass#' + - '#Method App\\Nova\\Resource::scoutQuery\(\) has parameter \$query with generic class Laravel\\Scout\\Builder but does not specify its types: TModel#' + - '#Method App\\Nova\\Resource::scoutQuery\(\) return type with generic class Laravel\\Scout\\Builder does not specify its types: TModel#' - '#Method App\\Nova\\Travel::showFieldOnForms\(\) has parameter \$formData with generic class Laravel\\Nova\\Fields\\FormData but does not specify its types: TKey, TValue#' - '#Method App\\Util\\DocuSign::getAccessToken\(\) should return string but returns mixed\.#' - '#Method App\\Util\\Matrix::[a-zA-Z]+\(\) has parameter \$decoded_itinerary with no value type specified in iterable type array\.#' @@ -240,6 +242,7 @@ parameters: - '#Parameter \#2 \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method App\\Nova\\Filters\\[a-zA-Z]+::apply\(\) should be contravariant with parameter \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method Laravel\\Nova\\Contracts\\Filter::apply\(\)#' - '#Parameter \#2 \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method App\\Nova\\Filters\\[a-zA-Z]+::apply\(\) should be contravariant with parameter \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method Laravel\\Nova\\Filters\\Filter::apply\(\)#' - '#Parameter \#2 \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method App\\Nova\\Lenses\\RecentInactiveUsers::query\(\) should be contravariant with parameter \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method Laravel\\Nova\\Lenses\\Lens::query\(\)#' + - '#Parameter \#2 \$query \(Laravel\\Scout\\Builder\) of method App\\Nova\\User::scoutQuery\(\) should be contravariant with parameter \$query \(Laravel\\Scout\\Builder\) of method App\\Nova\\Resource::scoutQuery\(\)#' - '#Parameter \#2 \$requestedRelationships of static method App\\Util\\AuthorizeInclude::authorize\(\) expects string\|null, mixed given\.#' - '#Parameter \#2 \$signatureHeader of static method Square\\Utils\\WebhooksHelper::isValidWebhookEventSignature\(\) expects string, string\|null given\.#' - '#Parameter \#2 \$string of function explode expects string, mixed given\.#' diff --git a/psalm.xml b/psalm.xml index c480f6834..163f4a711 100644 --- a/psalm.xml +++ b/psalm.xml @@ -314,6 +314,7 @@ +