File tree 2 files changed +10
-6
lines changed
src/Psalm/Internal/Analyzer/Statements/Expression
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1466,13 +1466,15 @@ private static function handleByRefFunctionArg(
1466
1466
$ statements_analyzer ->addSuppressedIssues (['EmptyArrayAccess ' ]);
1467
1467
}
1468
1468
1469
- if (ExpressionAnalyzer::analyze ($ statements_analyzer , $ arg ->value , $ context ) === false ) {
1470
- return false ;
1471
- }
1469
+ $ v = ExpressionAnalyzer::analyze ($ statements_analyzer , $ arg ->value , $ context );
1472
1470
1473
1471
if (!in_array ('EmptyArrayAccess ' , $ suppressed_issues , true )) {
1474
1472
$ statements_analyzer ->removeSuppressedIssues (['EmptyArrayAccess ' ]);
1475
1473
}
1474
+
1475
+ if ($ v === false ) {
1476
+ return false ;
1477
+ }
1476
1478
}
1477
1479
1478
1480
return null ;
Original file line number Diff line number Diff line change @@ -217,9 +217,7 @@ public static function analyze(
217
217
$ statements_analyzer ->addSuppressedIssues (['RedundantConditionGivenDocblockType ' ]);
218
218
}
219
219
220
- if (ExpressionAnalyzer::analyze ($ statements_analyzer , $ ternary , $ context ) === false ) {
221
- return false ;
222
- }
220
+ $ v = ExpressionAnalyzer::analyze ($ statements_analyzer , $ ternary , $ context );
223
221
224
222
if (!in_array ('RedundantCondition ' , $ suppressed_issues , true )) {
225
223
$ statements_analyzer ->removeSuppressedIssues (['RedundantCondition ' ]);
@@ -229,6 +227,10 @@ public static function analyze(
229
227
$ statements_analyzer ->removeSuppressedIssues (['RedundantConditionGivenDocblockType ' ]);
230
228
}
231
229
230
+ if ($ v === false ) {
231
+ return false ;
232
+ }
233
+
232
234
if ($ switch_var_id && $ last_arm ->conds ) {
233
235
$ codebase = $ statements_analyzer ->getCodebase ();
234
236
You can’t perform that action at this time.
0 commit comments