PhpParser\PrettyPrinterAbstract::pImplode PHP Method

pImplode() protected method

Pretty prints an array of nodes and implodes the printed values.
protected pImplode ( array $nodes, string $glue = '' ) : string
$nodes array Array of Nodes to be printed
$glue string Character to implode with
return string Imploded pretty printed nodes
    protected function pImplode(array $nodes, $glue = '')
    {
        $pNodes = array();
        foreach ($nodes as $node) {
            if (null === $node) {
                $pNodes[] = '';
            } else {
                $pNodes[] = $this->p($node);
            }
        }
        return implode($glue, $pNodes);
    }