Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3c4d820

Browse files
committed
prevent duplicated work
1 parent eb456bd commit 3c4d820

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/Analyser/MutatingScope.php‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3728,7 +3728,8 @@ private function enterAnonymousFunctionWithoutReflection(
37283728
$nativeTypes[$paramExprString] = ExpressionTypeHolder::createYes($use->var, $variableNativeType);
37293729
}
37303730

3731-
foreach ($this->invalidateStaticExpressions($this->expressionTypes) as $exprString => $typeHolder) {
3731+
$nonStaticExpressions = $this->invalidateStaticExpressions($this->expressionTypes);
3732+
foreach ($nonStaticExpressions as $exprString => $typeHolder) {
37323733
$expr = $typeHolder->getExpr();
37333734

37343735
if ($expr instanceof Variable) {
@@ -3758,7 +3759,7 @@ private function enterAnonymousFunctionWithoutReflection(
37583759
$nativeTypes['$this'] = ExpressionTypeHolder::createYes($node, $this->getNativeType($node));
37593760

37603761
if ($this->phpVersion->supportsReadOnlyProperties()) {
3761-
foreach ($this->invalidateStaticExpressions($this->expressionTypes) as $exprString => $typeHolder) {
3762+
foreach ($nonStaticExpressions as $exprString => $typeHolder) {
37623763
$expr = $typeHolder->getExpr();
37633764

37643765
if (

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /