rector/tests/debug_functions.php
Tomas Votruba 8af70b5ac0
[Defluent] Refactoring to multiple rules (#4400)
* [Defluent] Refactoring to multiple rules

* [Defluent] Decouple defluent-only set, it deserved to have own domain

* cleanup

* [rector] cleanup

* [cs] cleanup

* fixup! cleanup

* static fixes

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-14 04:24:29 +00:00

27 lines
535 B
PHP

<?php
declare(strict_types=1);
use PhpParser\Node;
use PhpParser\PrettyPrinter\Standard;
require __DIR__ . '/../vendor/autoload.php';
/**
* @param Node|Node[] $node
*/
function print_node($node): void
{
$standard = new Standard();
if (is_array($node)) {
foreach ($node as $singleNode) {
$printedContent = $standard->prettyPrint([$singleNode]);
dump($printedContent);
}
} else {
$printedContent = $standard->prettyPrint([$node]);
dump($printedContent);
}
}