From df22ef134ee83a0b132b37946747d1a08fe59ea8 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 29 Aug 2023 19:03:41 +0200 Subject: [PATCH] Extractor::toPhp() removes doc comments [Closes #135] --- src/PhpGenerator/Extractor.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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]); }