PhpParser\PrettyPrinterAbstract::preprocessNodes PHP Method

preprocessNodes() protected method

Preprocesses the top-level nodes to initialize pretty printer state.
protected preprocessNodes ( array $nodes )
$nodes array Array of nodes
    protected function preprocessNodes(array $nodes)
    {
        /* We can use semicolon-namespaces unless there is a global namespace declaration */
        $this->canUseSemicolonNamespaces = true;
        foreach ($nodes as $node) {
            if ($node instanceof Stmt\Namespace_ && null === $node->name) {
                $this->canUseSemicolonNamespaces = false;
            }
        }
    }