1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Merge pull request #7022 from orklah/7007

remove the remaining dynamic property assignment
This commit is contained in:
orklah 2021-11-30 19:41:42 +01:00 committed by GitHub
commit 2c6ea7c551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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')
: '';