File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ private function generateAttributes(): array
257257
258258 $ returnType = null ;
259259
260- if ($ this ->returnType ) {
260+ if ($ this ->returnType !== null ) {
261261 $ returnType = $ this ->returnType ->type ();
262262 }
263263 if ($ this ->returnTypeDocBlockHint !== null ) {
Original file line number Diff line number Diff line change @@ -180,28 +180,22 @@ private function generateAttributes(): array
180180 if ($ this ->typed === false || $ this ->docBlockComment !== null || $ this ->typeDocBlockHint !== null ) {
181181 $ docBlockType = null ;
182182
183- if ($ this ->type ) {
183+ if ($ this ->type !== null ) {
184184 $ docBlockType = new VarTag ($ this ->type ->types ());
185185 }
186186 if ($ typeHint = $ this ->getTypeDocBlockHint ()) {
187187 $ docBlockType = new VarTag ($ typeHint );
188188 }
189189 $ docBlock = null ;
190190
191- if ($ this ->docBlockComment ) {
191+ if ($ docBlockType !== null ) {
192+ $ docBlock = new DocBlock ($ this ->docBlockComment );
193+ $ docBlock ->addTag ($ docBlockType );
194+ } elseif ($ this ->docBlockComment !== null ) {
192195 $ docBlock = new DocBlock ($ this ->docBlockComment );
193-
194- if ($ docBlockType !== null ) {
195- $ docBlock ->addTag ($ docBlockType );
196- }
197- }
198- if ($ this ->docBlockComment === null && $ docBlockType !== null ) {
199- $ docBlock = new DocBlock ($ this ->docBlockComment , $ docBlockType );
200196 }
201197
202198 if ($ docBlock !== null ) {
203- $ docBlock = new DocBlock ($ this ->docBlockComment , $ docBlockType );
204-
205199 $ attributes = ['comments ' => [new Doc ($ docBlock ->generate ())]];
206200 }
207201 }
You can’t perform that action at this time.
0 commit comments