mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 22:08:00 +01:00
8af70b5ac0
* [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>
27 lines
535 B
PHP
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);
|
|
}
|
|
}
|