mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-27 04:45:26 +01:00
fix: suppress PropertyNotSetInConstructor in Notifications\Notification
This commit is contained in:
parent
58c889914c
commit
2e290a2abb
@ -4,6 +4,7 @@ namespace Psalm\LaravelPlugin\Handlers;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Psalm\Plugin\EventHandler\AfterClassLikeVisitInterface;
|
||||
use Psalm\Plugin\EventHandler\Event\AfterClassLikeVisitEvent;
|
||||
use function in_array;
|
||||
@ -30,5 +31,10 @@ class SuppressHandler implements AfterClassLikeVisitInterface
|
||||
if (in_array(FormRequest::class, $storage->parent_classes) && !in_array('PropertyNotSetInConstructor', $storage->suppressed_issues)) {
|
||||
$storage->suppressed_issues[] = 'PropertyNotSetInConstructor';
|
||||
}
|
||||
|
||||
// Notification: suppress PropertyNotSetInConstructor.
|
||||
if (in_array(Notification::class, $storage->parent_classes) && !in_array('PropertyNotSetInConstructor', $storage->suppressed_issues)) {
|
||||
$storage->suppressed_issues[] = 'PropertyNotSetInConstructor';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user