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
270270
271271 $ returnType = null ;
272272
273- if ($ this ->returnType !== null ) {
273+ if ($ this ->returnType !== null && $ this -> typed === false ) {
274274 $ returnType = $ this ->returnType ->type ();
275275 }
276276 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
144144 ]
145145 );
146146 $ method ->setReturnType ('void ' );
147+ $ method ->setReturnTypeDocBlockHint ('void ' );
147148 $ method ->setDocBlockComment ('Sets an awesome type ' );
148149 $ method ->setTyped (true );
149150
@@ -203,6 +204,7 @@ public function it_generates_method_with_array_type_doc_block(): void
203204 ]
204205 );
205206 $ method ->setReturnType ('void ' );
207+ $ method ->setReturnTypeDocBlockHint ('void ' );
206208 $ method ->setDocBlockComment ('Sets awesome items ' );
207209
208210 $ expectedOutput = <<<'EOF'
You can’t perform that action at this time.
0 commit comments