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

remove the remaining dynamic property assignment

This commit is contained in:
orklah 2021-11-29 20:11:58 +01:00
parent 8bc71fcf85
commit 8ca0fc209a
2 changed files with 3 additions and 4 deletions

View File

@ -225,11 +225,10 @@ class SimpleNameResolver extends NodeVisitorAbstract
protected function addNamespacedName(Stmt\Class_ $node): void
{
/** @psalm-suppress UndefinedPropertyAssignment */
$node->namespacedName = Name::concat(
$node->setAttribute('namespacedName', Name::concat(
$this->nameContext->getNamespace(),
(string)$node->name
);
));
}
protected function resolveAttrGroups(Stmt\Class_ $node): void

View File

@ -152,7 +152,7 @@ class CodebaseTest extends TestCase
$storage = $event->getStorage();
$codebase = $event->getCodebase();
if ($storage->name === 'Psalm\\CurrentTest\\C' && $stmt instanceof Class_) {
$storage->custom_metadata['fqcn'] = (string)($stmt->namespacedName ?? $stmt->name);
$storage->custom_metadata['fqcn'] = (string)($stmt->getAttribute('namespacedName') ?? $stmt->name);
$storage->custom_metadata['extends'] = $stmt->extends instanceof Name
? (string)$stmt->extends->getAttribute('resolvedName')
: '';