mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-26 20:34:48 +01:00
fix: suppress NonInvariantDocblockPropertyType on Command::$description
This commit is contained in:
parent
273411ad94
commit
b41de178af
@ -14,9 +14,16 @@ class SuppressHandler implements AfterClassLikeVisitInterface
|
||||
{
|
||||
$storage = $event->getStorage();
|
||||
|
||||
// Commands: suppress PropertyNotSetInConstructor.
|
||||
if (in_array(Command::class, $storage->parent_classes) && !in_array('PropertyNotSetInConstructor', $storage->suppressed_issues)) {
|
||||
$storage->suppressed_issues[] = 'PropertyNotSetInConstructor';
|
||||
if (in_array(Command::class, $storage->parent_classes)) {
|
||||
if (!in_array('PropertyNotSetInConstructor', $storage->suppressed_issues)) {
|
||||
$storage->suppressed_issues[] = 'PropertyNotSetInConstructor';
|
||||
}
|
||||
if (isset($storage->properties['description'])) {
|
||||
$property = $storage->properties['description'];
|
||||
if (!in_array('NonInvariantDocblockPropertyType', $property->suppressed_issues)) {
|
||||
$property->suppressed_issues[] = 'NonInvariantDocblockPropertyType';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FormRequest: suppress PropertyNotSetInConstructor.
|
||||
|
Loading…
Reference in New Issue
Block a user