Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Analyser/MutatingScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -2927,7 +2927,7 @@ public function pushInFunctionCall($reflection, ?ParameterReflection $parameter)
$stack = $this->inFunctionCallsStack;
$stack[] = [$reflection, $parameter];

return $this->scopeFactory->create(
$functionScope = $this->scopeFactory->create(
$this->context,
$this->isDeclareStrictTypes(),
$this->getFunction(),
Expand All @@ -2945,14 +2945,16 @@ public function pushInFunctionCall($reflection, ?ParameterReflection $parameter)
$this->parentScope,
$this->nativeTypesPromoted,
);
$functionScope->resolvedTypes = $this->resolvedTypes;
return $functionScope;
}

public function popInFunctionCall(): self
{
$stack = $this->inFunctionCallsStack;
array_pop($stack);

return $this->scopeFactory->create(
$parentScope = $this->scopeFactory->create(
$this->context,
$this->isDeclareStrictTypes(),
$this->getFunction(),
Expand All @@ -2970,6 +2972,8 @@ public function popInFunctionCall(): self
$this->parentScope,
$this->nativeTypesPromoted,
);
$parentScope->resolvedTypes = $this->resolvedTypes;
return $parentScope;
}

/** @api */
Expand Down
Loading