elseif ($type === "VariableDeclaration"
) { if (in_array($n->
getKind(), array
($n::KIND_LET,
$n::KIND_CONST
))) { $addBrackets = true;
} return Traverser::DONT_TRAVERSE_CHILD_NODES;
} elseif (!
in_array($type,
$optBracketNodes)) { return Traverser::DONT_TRAVERSE_CHILD_NODES;
} };
//Traverse every node but stop whenever the $addBrackets variable becomes true
foreach ($node as $n) { $n->
traverse($checkFn);
if ($addBrackets) { break;
} } return $addBrackets;
} /**
* Render node's comments
*
* @param Syntax\Node\Node $node Node
* @param bool $leading False to render trailing comments
* @param bool|null $blockContent This paramater can have 3 values:
* - null: the node is not a block
* - false: the node is an empty block
* - true: the node is a block with content
*
* @return string
*/