function PrettyPrinterAbstract::pImplode
Pretty prints an array of nodes and implodes the printed values.
Parameters
Node[] $nodes Array of Nodes to be printed:
string $glue Character to implode with:
Return value
string Imploded pretty printed nodes> $pre
5 calls to PrettyPrinterAbstract::pImplode()
- PrettyPrinterAbstract::pCommaSeparated in vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinterAbstract.php - Pretty prints an array of nodes and implodes the printed values with commas.
- Standard::pIntersectionType in vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinter/ Standard.php - Standard::pStmt_Catch in vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinter/ Standard.php - Standard::pStmt_If in vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinter/ Standard.php - Standard::pStmt_TryCatch in vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinter/ Standard.php
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinterAbstract.php, line 465
Class
Namespace
PhpParserCode
protected function pImplode(array $nodes, string $glue = '') : string {
$pNodes = [];
foreach ($nodes as $node) {
if (null === $node) {
$pNodes[] = '';
}
else {
$pNodes[] = $this->p($node);
}
}
return implode($glue, $pNodes);
}