mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-27 13:13:31 +00:00
Readme > Explain print_node (#5595)
This commit is contained in:
parent
242c6371d3
commit
1561e108c0
|
@ -229,7 +229,8 @@ Or with Xdebug:
|
|||
vendor/bin/rector process src/Controller --dry-run --xdebug
|
||||
```
|
||||
|
||||
To assist with echo-style debugging rector provides a `rd()` helper method which is useful to pretty-print AST-nodes:
|
||||
To assist with echo-style debugging rector provides a [`print_node()` helper](tests/debug_functions.php) method
|
||||
which is useful to pretty-print AST-nodes:
|
||||
|
||||
```php
|
||||
/**
|
||||
|
@ -237,7 +238,7 @@ To assist with echo-style debugging rector provides a `rd()` helper method which
|
|||
*/
|
||||
public function refactor(Node $node): ?Node
|
||||
{
|
||||
rd($node);
|
||||
print_node($node);
|
||||
die;
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user