This repository was archived by the owner on Aug 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -309,9 +309,19 @@ public function render(): string {
309309
310310 $content = $this -> getContent();
311311
312+ $doc_block = $this -> docBlock ;
313+ $gen_from = $this -> generatedFrom ;
314+ if ($gen_from !== null ) {
315+ if ($doc_block !== null && ! Str \ends_with ($doc_block , " \n " )) {
316+ $doc_block .= " \n " ;
317+ }
318+ $doc_block = $doc_block . $gen_from -> render(). " \n " ;
319+ }
320+
312321 $formatter = $this -> config -> getFormatter();
313322
314323 if (! $this -> isSignedFile ) {
324+ $builder -> addDocBlock($doc_block );
315325 $builder -> add($content );
316326 $content = $builder -> getCode();
317327 if ($formatter !== null ) {
@@ -322,15 +332,6 @@ public function render(): string {
322332
323333 $old_content = $this -> loadExistingFiles();
324334
325- $doc_block = $this -> docBlock ;
326- $gen_from = $this -> generatedFrom ;
327- if ($gen_from !== null ) {
328- if ($doc_block !== null && ! Str \ends_with ($doc_block , " \n " )) {
329- $doc_block .= " \n " ;
330- }
331- $doc_block = $doc_block . $gen_from -> render(). " \n " ;
332- }
333-
334335 if (PartiallyGeneratedCode :: containsManualSection($content )) {
335336 $builder -> addDocBlock(
336337 PartiallyGeneratedSignedSource :: getDocBlock($doc_block ),
Original file line number Diff line number Diff line change @@ -170,6 +170,9 @@ class Foo {
170170!@#$%codegentest:testNoSignature
171171<?hh // strict
172172// Codegen Tests
173+ /**
174+ * Completely autogenerated!
175+ */
173176
174177class NoSignature {
175178
You can’t perform that action at this time.
0 commit comments