Skip to content

Commit 89f6e93

Browse files
phpstan-botclaude
andcommitted
Inline shouldNotCarryForwardPropertyFetchInClosure check
The method was a trivial one-liner, so inline the instanceof check directly at the call site and remove the private method. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6671089 commit 89f6e93

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/Analyser/MutatingScope.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,7 +2152,7 @@ public function enterAnonymousFunctionWithoutReflection(
21522152
}
21532153
}
21542154

2155-
if ($this->shouldNotCarryForwardPropertyFetchInClosure($expr)) {
2155+
if ($expr instanceof PropertyFetch) {
21562156
continue;
21572157
}
21582158

@@ -2222,11 +2222,6 @@ public function enterAnonymousFunctionWithoutReflection(
22222222
);
22232223
}
22242224

2225-
private function shouldNotCarryForwardPropertyFetchInClosure(Expr $expr): bool
2226-
{
2227-
return $expr instanceof PropertyFetch;
2228-
}
2229-
22302225
private function expressionTypeIsUnchangeable(ExpressionTypeHolder $typeHolder): bool
22312226
{
22322227
$expr = $typeHolder->getExpr();

0 commit comments

Comments
 (0)