Skip to content

Commit

Permalink
fix phpcs issue
Browse files Browse the repository at this point in the history
  • Loading branch information
schlndh committed May 17, 2024
1 parent 69523f8 commit 43dab45
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Analyser/NodeScopeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2675,17 +2675,17 @@ static function (): void {
}
}
$scopeClasses = ['static'];
if (isset($expr->getArgs()[2])) {
$argValue = $expr->getArgs()[2]->value;
$argValueType = $scope->getType($argValue);
$scopeObjectType = $argValueType->getObjectTypeOrClassStringObjectType();
$thisType = $thisType !== null
// $thisType could be mixed, error, ...
? TypeCombinator::intersect($thisType, $scopeObjectType)
: $scopeObjectType;
$scopeClasses = $scopeObjectType->getObjectClassNames();
}
$closureBindScope = $scope->enterClosureBind($thisType, $nativeThisType, $scopeClasses);
if (isset($expr->getArgs()[2])) {
$argValue = $expr->getArgs()[2]->value;
$argValueType = $scope->getType($argValue);
$scopeObjectType = $argValueType->getObjectTypeOrClassStringObjectType();
$thisType = $thisType !== null
// $thisType could be mixed, error, ...
? TypeCombinator::intersect($thisType, $scopeObjectType)
: $scopeObjectType;
$scopeClasses = $scopeObjectType->getObjectClassNames();
}
$closureBindScope = $scope->enterClosureBind($thisType, $nativeThisType, $scopeClasses);
}
} else {
$throwPoints[] = ThrowPoint::createImplicit($scope, $expr);
Expand Down

0 comments on commit 43dab45

Please sign in to comment.