File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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
237237 return null ;
238238 }
239239
240- // Type can be inside promoted property comment as `@var`
240+ // Type can be inside property docblock as `@var`
241241 $ rawDocNode = $ reflectionProperty ->getDocComment ();
242242 $ phpDocNode = $ rawDocNode ? $ this ->getPhpDocNode ($ rawDocNode ) : null ;
243243 $ source = self ::PROPERTY ;
244244
245- if ($ phpDocNode && [] === $ phpDocNode ->getTagsByName ('@var ' )) {
245+ if (! $ phpDocNode? ->getTagsByName('@var ' )) {
246246 $ phpDocNode = null ;
247247 }
248248
249- // or in the constructor comment as `@param`.
249+ // or in the constructor as `@param` for promoted properties
250250 if (!$ phpDocNode && $ reflectionProperty ->isPromoted ()) {
251251 $ constructor = new \ReflectionMethod ($ class , '__construct ' );
252252 $ rawDocNode = $ constructor ->getDocComment ();
You can’t perform that action at this time.
0 commit comments