Skip to content

Commit 5befd94

Browse files
committed
Update NodeScopeResolver.php
1 parent c191148 commit 5befd94

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
@@ -5647,7 +5647,7 @@ static function (): void {
56475647
TypeCombinator::intersect($assignedExprType->toCoercedArgumentType(true), $propertyNativeType),
56485648
TypeCombinator::intersect($assignedNativeType->toCoercedArgumentType(true), $propertyNativeType),
56495649
);
5650-
} elseif (TypeCombinator::containsNull($propertyNativeType) && !TypeCombinator::containsNull($assignedNativeType)) {
5650+
} elseif (!$propertyNativeType->isNull()->no() && $assignedNativeType->isNull()->no()) {
56515651
$scope = $scope->assignExpression(
56525652
$var,
56535653
TypeCombinator::removeNull($propertyReflection->hasPhpDocType() ? $propertyReflection->getPhpDocType() : $propertyNativeType),
@@ -5741,7 +5741,7 @@ static function (): void {
57415741
TypeCombinator::intersect($assignedExprType->toCoercedArgumentType(true), $propertyNativeType),
57425742
TypeCombinator::intersect($assignedNativeType->toCoercedArgumentType(true), $propertyNativeType),
57435743
);
5744-
} elseif (TypeCombinator::containsNull($propertyNativeType) && !TypeCombinator::containsNull($assignedNativeType)) {
5744+
} elseif (!$propertyNativeType->isNull()->no() && $assignedNativeType->isNull()->no()) {
57455745
$scope = $scope->assignExpression(
57465746
$var,
57475747
TypeCombinator::removeNull($propertyReflection->hasPhpDocType() ? $propertyReflection->getPhpDocType() : $propertyNativeType),

0 commit comments

Comments
 (0)