Skip to content

Commit efb6d78

Browse files
committed
fix more functions
1 parent d580ca3 commit efb6d78

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2707,6 +2707,10 @@ static function (): void {
27072707
$scope->getType($arrayArg)->shuffleArray(),
27082708
$scope->getNativeType($arrayArg)->shuffleArray(),
27092709
);
2710+
2711+
if ($arrayArg instanceof PropertyFetch || $arrayArg instanceof StaticPropertyFetch) {
2712+
$nodeCallback(new PropertyAssignNode($arrayArg, new TypeExpr($scope->getType($arrayArg)), false), $scope);
2713+
}
27102714
}
27112715

27122716
if (
@@ -2727,6 +2731,10 @@ static function (): void {
27272731
$arrayArgType->spliceArray($offsetType, $lengthType, $replacementType),
27282732
$arrayArgNativeType->spliceArray($offsetType, $lengthType, $replacementType),
27292733
);
2734+
2735+
if ($arrayArg instanceof PropertyFetch || $arrayArg instanceof StaticPropertyFetch) {
2736+
$nodeCallback(new PropertyAssignNode($arrayArg, new TypeExpr($scope->getType($arrayArg)), false), $scope);
2737+
}
27302738
}
27312739

27322740
if (
@@ -2740,6 +2748,10 @@ static function (): void {
27402748
$this->getArraySortPreserveListFunctionType($scope->getType($arrayArg)),
27412749
$this->getArraySortPreserveListFunctionType($scope->getNativeType($arrayArg)),
27422750
);
2751+
2752+
if ($arrayArg instanceof PropertyFetch || $arrayArg instanceof StaticPropertyFetch) {
2753+
$nodeCallback(new PropertyAssignNode($arrayArg, new TypeExpr($scope->getType($arrayArg)), false), $scope);
2754+
}
27432755
}
27442756

27452757
if (
@@ -2753,6 +2765,10 @@ static function (): void {
27532765
$this->getArraySortDoNotPreserveListFunctionType($scope->getType($arrayArg)),
27542766
$this->getArraySortDoNotPreserveListFunctionType($scope->getNativeType($arrayArg)),
27552767
);
2768+
2769+
if ($arrayArg instanceof PropertyFetch || $arrayArg instanceof StaticPropertyFetch) {
2770+
$nodeCallback(new PropertyAssignNode($arrayArg, new TypeExpr($scope->getType($arrayArg)), false), $scope);
2771+
}
27562772
}
27572773

27582774
if (

0 commit comments

Comments
 (0)