Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 35bb8bd

Browse files
committed
[PropertyInfo] Fix multi phpdoc covered promoted properties
1 parent 57bbc38 commit 35bb8bd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ public function getTypes(string $class, string $property, array $context = []):
9999
continue;
100100
}
101101

102+
if (
103+
$tagDocNode->value instanceof ParamTagValueNode
104+
&& $prefix === null
105+
&& $tagDocNode->value->parameterName !== '$' . $property
106+
) {
107+
continue;
108+
}
109+
102110
foreach ($this->phpStanTypeHelper->getTypes($tagDocNode->value, $nameScope) as $type) {
103111
switch ($type->getClassName()) {
104112
case 'self':

0 commit comments

Comments
 (0)