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

Skip to content

Commit 41384de

Browse files
null-safe assignment on namescope
Co-authored-by: Nicolas Grekas <[email protected]>
1 parent 83ab05c commit 41384de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function getTypes(string $class, string $property, array $context = []):
123123
continue;
124124
}
125125

126-
$nameScope = $this->contexts[$class.'/'.$declaringClass] ??= $this->nameScopeFactory->create($class, $declaringClass);
126+
$nameScope ??= $this->contexts[$class.'/'.$declaringClass] ??= $this->nameScopeFactory->create($class, $declaringClass);
127127
foreach ($this->phpStanTypeHelper->getTypes($tagDocNode->value, $nameScope) as $type) {
128128
switch ($type->getClassName()) {
129129
case 'self':

0 commit comments

Comments
 (0)