Skip to content

Commit 6b5e8e6

Browse files
committed
Update AssignHandler.php
1 parent 7f91cb0 commit 6b5e8e6

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/Analyser/ExprHandler/AssignHandler.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -877,9 +877,10 @@ private function processSureTypesForConditionalExpressionsAfterAssign(
877877
|| $expr instanceof MethodCall
878878
|| $expr instanceof Expr\StaticCall
879879
)
880-
&& $isImpure
881880
) {
882-
continue;
881+
if ($isImpure) {
882+
continue;
883+
}
883884
} elseif (
884885
!$expr instanceof PropertyFetch
885886
&& !$expr instanceof ArrayDimFetch
@@ -931,9 +932,10 @@ private function processSureNotTypesForConditionalExpressionsAfterAssign(
931932
|| $expr instanceof MethodCall
932933
|| $expr instanceof Expr\StaticCall
933934
)
934-
&& $isImpure
935935
) {
936-
continue;
936+
if ($isImpure) {
937+
continue;
938+
}
937939
} elseif (
938940
!$expr instanceof PropertyFetch
939941
&& !$expr instanceof ArrayDimFetch

0 commit comments

Comments
 (0)