Skip to content

struggling with my first rule #8785

Answered by samsonasik
DanielRuf asked this question in Q&A
Discussion options

You must be logged in to vote

Ref original answer #8784 (comment) so no need write down answer.

First, apply rename class + method + auto import https://getrector.com/demo/a38638ff-7f36-4b24-9d49-dc7a9daaff80

per AST structure at https://getrector.com/ast/a4686a7810518c6c740f126e056bdb77c39b4847

You can use MethodCall, which verify its var is StaticCall, it read from the back to front to verify it, then you can change/insert new Arg between.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by samsonasik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants