Skip to content

Commit 140480b

Browse files
committed
add note: ensure future not forget about it
1 parent e02dbda commit 140480b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

rules/CodingStyle/ClassNameImport/ClassNameImportSkipVoter/ClassLikeNameClassNameImportSkipVoter.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public function shouldSkip(File $file, FullyQualifiedObjectType $fullyQualifiedO
3535
return false;
3636
}
3737

38+
/**
39+
* Note: Don't use ScopeFetcher::fetch() on Name instance,
40+
* Scope can be null on Name
41+
* This is part of ScopeAnalyzer::NON_REFRESHABLE_NODES
42+
* @see https://github.com/rectorphp/rector-src/blob/9929af7c0179929b4fde6915cb7a06c3141dde6c/src/NodeAnalyzer/ScopeAnalyzer.php#L17
43+
*/
3844
$scope = $node->getAttribute(AttributeKey::SCOPE);
3945
$namespace = $scope instanceof Scope ? $scope->getNamespace() : null;
4046
$namespace = strtolower((string) $namespace);

0 commit comments

Comments
 (0)