-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
rectorphp/rector-src
#4869Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | dev-main |
Demo URI https://getrector.com/demo/235d76a6-ac47-4265-b207-ca467e803453
Minimal PHP Code Causing Issue
When inside is_a(), the NodeTraverser::DONT_TRAVERSE_CHILDREN stop other rules due to direct NodeTraverser::DONT_TRAVERSE_CHILDREN usage:
rector/rules/Php55/Rector/String_/StringClassNameToClassConstantRector.php
Lines 100 to 105 in 08c1a94
| if ($node instanceof FuncCall) { | |
| if ($this->isName($node, 'is_a')) { | |
| return NodeTraverser::DONT_TRAVERSE_CHILDREN; | |
| } | |
| return null; | |
| } |
It should only stop traverse on current rule, not other rule, other rule with String_ node still need apply.
Expected Behaviour
It should apply:
- 'AnotherClass',
+ 'new test',as different rule.
Reactions are currently unavailable