File tree 1 file changed +20
-24
lines changed
1 file changed +20
-24
lines changed Original file line number Diff line number Diff line change @@ -278,32 +278,28 @@ public function specifyTypesInCondition(
278
278
$ exprLeftType = $ scope ->getType ($ expr ->left );
279
279
$ exprRightType = $ scope ->getType ($ expr ->right );
280
280
if ($ exprLeftType instanceof ConstantType || $ exprLeftType instanceof EnumCaseObjectType) {
281
- if (!$ expr ->right instanceof Node \Scalar && !$ expr ->right instanceof Expr \Array_) {
282
- $ types = $ this ->create (
283
- $ expr ->right ,
284
- $ exprLeftType ,
285
- $ context ,
286
- false ,
287
- $ scope ,
288
- $ rootExpr ,
289
- );
290
- }
281
+ $ types = $ this ->create (
282
+ $ expr ->right ,
283
+ $ exprLeftType ,
284
+ $ context ,
285
+ false ,
286
+ $ scope ,
287
+ $ rootExpr ,
288
+ );
291
289
}
292
290
if ($ exprRightType instanceof ConstantType || $ exprRightType instanceof EnumCaseObjectType) {
293
- if ($ types === null || (!$ expr ->left instanceof Node \Scalar && !$ expr ->left instanceof Expr \Array_)) {
294
- $ leftType = $ this ->create (
295
- $ expr ->left ,
296
- $ exprRightType ,
297
- $ context ,
298
- false ,
299
- $ scope ,
300
- $ rootExpr ,
301
- );
302
- if ($ types !== null ) {
303
- $ types = $ types ->unionWith ($ leftType );
304
- } else {
305
- $ types = $ leftType ;
306
- }
291
+ $ leftType = $ this ->create (
292
+ $ expr ->left ,
293
+ $ exprRightType ,
294
+ $ context ,
295
+ false ,
296
+ $ scope ,
297
+ $ rootExpr ,
298
+ );
299
+ if ($ types !== null ) {
300
+ $ types = $ types ->unionWith ($ leftType );
301
+ } else {
302
+ $ types = $ leftType ;
307
303
}
308
304
}
309
305
You can’t perform that action at this time.
0 commit comments