@@ -5642,17 +5642,11 @@ static function (): void {
5642
5642
5643
5643
if ($ assignedTypeIsCompatible ) {
5644
5644
$ scope = $ scope ->assignExpression ($ var , $ assignedExprType , $ scope ->getNativeType ($ assignedExpr ));
5645
- } elseif ($ scope ->isDeclareStrictTypes ()) {
5646
- $ scope = $ scope ->assignExpression (
5647
- $ var ,
5648
- TypeCombinator::intersect ($ assignedExprType ->toCoercedArgumentType (true ), $ propertyNativeType ),
5649
- TypeCombinator::intersect ($ scope ->getNativeType ($ assignedExpr )->toCoercedArgumentType (true ), $ propertyNativeType ),
5650
- );
5651
5645
} else {
5652
5646
$ scope = $ scope ->assignExpression (
5653
5647
$ var ,
5654
- TypeCombinator::intersect ($ assignedExprType ->toCoercedArgumentType (false ), $ propertyNativeType ),
5655
- TypeCombinator::intersect ($ scope ->getNativeType ($ assignedExpr )->toCoercedArgumentType (false ), $ propertyNativeType ),
5648
+ TypeCombinator::intersect ($ assignedExprType ->toCoercedArgumentType ($ scope -> isDeclareStrictTypes () ), $ propertyNativeType ),
5649
+ TypeCombinator::intersect ($ scope ->getNativeType ($ assignedExpr )->toCoercedArgumentType ($ scope -> isDeclareStrictTypes () ), $ propertyNativeType ),
5656
5650
);
5657
5651
}
5658
5652
} else {
@@ -5737,17 +5731,11 @@ static function (): void {
5737
5731
5738
5732
if ($ assignedTypeIsCompatible ) {
5739
5733
$ scope = $ scope ->assignExpression ($ var , $ assignedExprType , $ scope ->getNativeType ($ assignedExpr ));
5740
- } elseif ($ scope ->isDeclareStrictTypes ()) {
5741
- $ scope = $ scope ->assignExpression (
5742
- $ var ,
5743
- TypeCombinator::intersect ($ assignedExprType ->toCoercedArgumentType (true ), $ propertyNativeType ),
5744
- TypeCombinator::intersect ($ scope ->getNativeType ($ assignedExpr )->toCoercedArgumentType (true ), $ propertyNativeType ),
5745
- );
5746
5734
} else {
5747
5735
$ scope = $ scope ->assignExpression (
5748
5736
$ var ,
5749
- TypeCombinator::intersect ($ assignedExprType ->toCoercedArgumentType (false ), $ propertyNativeType ),
5750
- TypeCombinator::intersect ($ scope ->getNativeType ($ assignedExpr )->toCoercedArgumentType (false ), $ propertyNativeType ),
5737
+ TypeCombinator::intersect ($ assignedExprType ->toCoercedArgumentType ($ scope -> isDeclareStrictTypes () ), $ propertyNativeType ),
5738
+ TypeCombinator::intersect ($ scope ->getNativeType ($ assignedExpr )->toCoercedArgumentType ($ scope -> isDeclareStrictTypes () ), $ propertyNativeType ),
5751
5739
);
5752
5740
}
5753
5741
} else {
0 commit comments