Skip to content

Commit 2b38516

Browse files
committed
ensure first class callable
1 parent 2996f4e commit 2b38516

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/PhpParser/PrettyPrinterAbstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ protected function p(
765765
$pos = $subEndPos + 1;
766766
}
767767

768-
if ($node instanceof CallLike && substr(trim($result), -3) === '...') {
768+
if ($node instanceof CallLike && substr(trim($result), -3) === '...' && $node->isFirstClassCallable()) {
769769
$result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment, true);
770770
} else {
771771
$result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment);

0 commit comments

Comments
 (0)