File tree 2 files changed +6
-12
lines changed
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
257
257
258
258
$ returnType = null ;
259
259
260
- if ($ this ->returnType ) {
260
+ if ($ this ->returnType !== null ) {
261
261
$ returnType = $ this ->returnType ->type ();
262
262
}
263
263
if ($ this ->returnTypeDocBlockHint !== null ) {
Original file line number Diff line number Diff line change @@ -180,28 +180,22 @@ private function generateAttributes(): array
180
180
if ($ this ->typed === false || $ this ->docBlockComment !== null || $ this ->typeDocBlockHint !== null ) {
181
181
$ docBlockType = null ;
182
182
183
- if ($ this ->type ) {
183
+ if ($ this ->type !== null ) {
184
184
$ docBlockType = new VarTag ($ this ->type ->types ());
185
185
}
186
186
if ($ typeHint = $ this ->getTypeDocBlockHint ()) {
187
187
$ docBlockType = new VarTag ($ typeHint );
188
188
}
189
189
$ docBlock = null ;
190
190
191
- if ($ this ->docBlockComment ) {
191
+ if ($ docBlockType !== null ) {
192
+ $ docBlock = new DocBlock ($ this ->docBlockComment );
193
+ $ docBlock ->addTag ($ docBlockType );
194
+ } elseif ($ this ->docBlockComment !== null ) {
192
195
$ 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 );
200
196
}
201
197
202
198
if ($ docBlock !== null ) {
203
- $ docBlock = new DocBlock ($ this ->docBlockComment , $ docBlockType );
204
-
205
199
$ attributes = ['comments ' => [new Doc ($ docBlock ->generate ())]];
206
200
}
207
201
}
You can’t perform that action at this time.
0 commit comments