File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -237,16 +237,16 @@ private function getDocBlockFromProperty(string $class, string $property): ?arra
237
237
return null ;
238
238
}
239
239
240
- // Type can be inside promoted property comment as `@var`
240
+ // Type can be inside property docblock as `@var`
241
241
$ rawDocNode = $ reflectionProperty ->getDocComment ();
242
242
$ phpDocNode = $ rawDocNode ? $ this ->getPhpDocNode ($ rawDocNode ) : null ;
243
243
$ source = self ::PROPERTY ;
244
244
245
- if ($ phpDocNode && [] === $ phpDocNode ->getTagsByName ('@var ' )) {
245
+ if (! $ phpDocNode? ->getTagsByName('@var ' )) {
246
246
$ phpDocNode = null ;
247
247
}
248
248
249
- // or in the constructor comment as `@param`.
249
+ // or in the constructor as `@param` for promoted properties
250
250
if (!$ phpDocNode && $ reflectionProperty ->isPromoted ()) {
251
251
$ constructor = new \ReflectionMethod ($ class , '__construct ' );
252
252
$ rawDocNode = $ constructor ->getDocComment ();
You can’t perform that action at this time.
0 commit comments