Rule dependent on another rule #7269
|
Is there a possibility to define that in order to run Rector rule |
Replies: 2 comments
|
Hi, by nature of abstract syntax tree, this is not possible. If you traverse class, the class Rector will get exectued before method Rector. Design your rules to handle the least common node at once. |
|
Hi @TomasVotruba , |
Hi, by nature of abstract syntax tree, this is not possible. If you traverse class, the class Rector will get exectued before method Rector.
The rules have to be idempotent, not depending on each other.
Design your rules to handle the least common node at once.