File tree 2 files changed +13
-9
lines changed
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 {
309
309
310
310
$content = $this -> getContent();
311
311
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
+
312
321
$formatter = $this -> config -> getFormatter();
313
322
314
323
if (! $this -> isSignedFile ) {
324
+ $builder -> addDocBlock($doc_block );
315
325
$builder -> add($content );
316
326
$content = $builder -> getCode();
317
327
if ($formatter !== null ) {
@@ -322,15 +332,6 @@ public function render(): string {
322
332
323
333
$old_content = $this -> loadExistingFiles();
324
334
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
-
334
335
if (PartiallyGeneratedCode :: containsManualSection($content )) {
335
336
$builder -> addDocBlock(
336
337
PartiallyGeneratedSignedSource :: getDocBlock($doc_block ),
Original file line number Diff line number Diff line change @@ -170,6 +170,9 @@ class Foo {
170
170
!@#$%codegentest:testNoSignature
171
171
<?hh // strict
172
172
// Codegen Tests
173
+ /**
174
+ * Completely autogenerated!
175
+ */
173
176
174
177
class NoSignature {
175
178
You can’t perform that action at this time.
0 commit comments