protected function pStmts(array $nodes, $indent = true)
{
$result = '';
foreach ($nodes as $node) {
$comments = $node->getAttribute('comments', array());
if ($comments) {
$result .= "\n" . $this->pComments($comments);
if ($node instanceof Stmt\Nop) {
continue;
}
}
$result .= "\n" . $this->p($node) . ($node instanceof Expr ? ';' : '');
}
if ($indent) {
return preg_replace('~\\n(?!$|' . $this->noIndentToken . ')~', "\n ", $result);
} else {
return $result;
}
}