diff --git a/src/PhpGenerator/Extractor.php b/src/PhpGenerator/Extractor.php index 9daeeabd..c38c9207 100644 --- a/src/PhpGenerator/Extractor.php +++ b/src/PhpGenerator/Extractor.php @@ -429,9 +429,11 @@ private function toVisibility(int $flags): ?string } - private function toPhp(mixed $value): string + private function toPhp(Node $value): string { - return $this->printer->prettyPrint([$value]); + $dolly = clone $value; + $dolly->setAttribute('comments', []); + return $this->printer->prettyPrint([$dolly]); }