Skip to content

Commit 28bc5ab

Browse files
committed
Update NodeScopeResolver.php
1 parent 67fb192 commit 28bc5ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Analyser/NodeScopeResolver.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,7 @@ static function (): void {
26402640
$hasCountExpr = $scope->hasExpressionType($countArrayExpr)->yes();
26412641
if ($hasCountExpr) {
26422642
$countType = $scope->getType(new BinaryOp\Minus($countArrayExpr, new Int_(1)));
2643-
$countNativeType = $scope->getType(new BinaryOp\Minus($countArrayExpr, new Int_(1)));
2643+
$countNativeType = $scope->getNativeType(new BinaryOp\Minus($countArrayExpr, new Int_(1)));
26442644
}
26452645

26462646
$isArrayPop = $functionReflection->getName() === 'array_pop';
@@ -2681,7 +2681,7 @@ static function (): void {
26812681
$hasCountExpr = $scope->hasExpressionType($countArrayExpr)->yes();
26822682
if ($hasCountExpr && $addedElementsCount !== null) {
26832683
$countType = $scope->getType(new BinaryOp\Plus($countArrayExpr, new Int_($addedElementsCount)));
2684-
$countNativeType = $scope->getType(new BinaryOp\Plus($countArrayExpr, new Int_($addedElementsCount)));
2684+
$countNativeType = $scope->getNativeType(new BinaryOp\Plus($countArrayExpr, new Int_($addedElementsCount)));
26852685
} else {
26862686
$countType = IntegerRangeType::fromInterval($addedElementsCount, null);
26872687
$countNativeType = IntegerRangeType::fromInterval($addedElementsCount, null);

0 commit comments

Comments
 (0)