-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CheckUnusedViews don't check method view in MailMessage class #2063
Comments
I'm not sure that we are collecting views from larastan/src/Rules/UnusedViewsRule.php Lines 50 to 57 in b0bfa09
|
I found this too |
I can contribute and add a new Collector for MailMessage |
All that should be needed is to also check that larastan/src/Collectors/UsedEmailViewCollector.php Lines 45 to 47 in b0bfa09
$type = $scope->getType($class);
if (
! (new ObjectType(Mailable::class))->isSuperTypeOf($type)->yes()
&& ! (new ObjectType(MailMessage::class))->isSuperTypeOf($type)->yes()
) {
return null;
} |
Description
I am using views in my notifications with the MailMessage class, but phpstan doesn't recognize that these views are being used there and throws an error with the rule checkUnusedViews: true.
Laravel code where the issue was found
error:
The text was updated successfully, but these errors were encountered: