英文:
In a rector rule's refactor function, how to print the current node as code?
问题
在规则的 refactor 函数中有一个 Node,我如何将整个节点打印为 PHP 代码?
英文:
Having a Node in the refactor function of a rule, how can I print the full node as php code?
答案1
得分: 0
已找到!
使用Composer安装rector/rector-debugging包。
然后可以使用一些辅助工具。
我需要的是print_node。
英文:
Found !
Install, using composer, the package rector/rector-debugging
Then there is available some helpers.
The one I needed was print_node.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论