1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Merge pull request #7217 from weirdan/restore-constant-attributes-storage

This commit is contained in:
Bruce Weirdan 2021-12-26 04:10:54 +02:00 committed by GitHub
commit aea1cba982
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -1296,6 +1296,19 @@ class ClassLikeNodeScanner
}
$constant_storage->description = $description;
foreach ($stmt->attrGroups as $attr_group) {
foreach ($attr_group->attrs as $attr) {
$constant_storage->attributes[] = AttributeResolver::resolve(
$this->codebase,
$this->file_scanner,
$this->file_storage,
$this->aliases,
$attr,
$this->storage->name ?? null
);
}
}
}
}

View File

@ -39,6 +39,12 @@ class ClassConstantStorage
*/
public $deprecated = false;
/**
* @var list<AttributeStorage>
* @psalm-suppress PossiblyUnusedProperty
*/
public $attributes = [];
/**
* @var ?string
*/