Skip to content

Commit 8fb56fb

Browse files
committed
Extractor::toPhp() removes doc comments [Closes #135]
1 parent 48b4e24 commit 8fb56fb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/PhpGenerator/Extractor.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,11 @@ private function toVisibility(int $flags): ?string
429429
}
430430

431431

432-
private function toPhp(mixed $value): string
432+
private function toPhp(Node $value): string
433433
{
434-
return $this->printer->prettyPrint([$value]);
434+
$dolly = clone $value;
435+
$dolly->setAttribute('comments', []);
436+
return $this->printer->prettyPrint([$dolly]);
435437
}
436438

437439

0 commit comments

Comments
 (0)