+
+ private function hasNodeWithComments(array $nodes) {
+ foreach ($nodes as $node) {
+ if ($node && $node->getAttribute('comments')) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private function pMaybeMultiline(array $nodes, $trailingComma = false) {
+ if (!$this->hasNodeWithComments($nodes)) {
+ return $this->pCommaSeparated($nodes);
+ } else {
+ return $this->pCommaSeparatedMultiline($nodes, $trailingComma) . "\n";
+ }
+ }