File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ private function generateAttributes(): array
270
270
271
271
$ returnType = null ;
272
272
273
- if ($ this ->returnType !== null ) {
273
+ if ($ this ->returnType !== null && $ this -> typed === false ) {
274
274
$ returnType = $ this ->returnType ->type ();
275
275
}
276
276
if ($ this ->returnTypeDocBlockHint !== null ) {
Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ public function it_generates_method_with_doc_block_comment(): void
144
144
]
145
145
);
146
146
$ method ->setReturnType ('void ' );
147
+ $ method ->setReturnTypeDocBlockHint ('void ' );
147
148
$ method ->setDocBlockComment ('Sets an awesome type ' );
148
149
$ method ->setTyped (true );
149
150
@@ -203,6 +204,7 @@ public function it_generates_method_with_array_type_doc_block(): void
203
204
]
204
205
);
205
206
$ method ->setReturnType ('void ' );
207
+ $ method ->setReturnTypeDocBlockHint ('void ' );
206
208
$ method ->setDocBlockComment ('Sets awesome items ' );
207
209
208
210
$ expectedOutput = <<<'EOF'
You can’t perform that action at this time.
0 commit comments