mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Allow loop breaks to take precedence over case breaks
This commit is contained in:
parent
aa426aca03
commit
c136974f4d
@ -24,6 +24,8 @@ class DoChecker
|
||||
) {
|
||||
$do_context = clone $context;
|
||||
|
||||
$do_context->inside_case = false;
|
||||
|
||||
$project_checker = $statements_checker->getFileChecker()->project_checker;
|
||||
|
||||
if ($project_checker->alter_code) {
|
||||
|
@ -50,6 +50,7 @@ class ForChecker
|
||||
$for_context = clone $context;
|
||||
|
||||
$for_context->inside_loop = true;
|
||||
$for_context->inside_case = false;
|
||||
|
||||
$project_checker = $statements_checker->getFileChecker()->project_checker;
|
||||
|
||||
|
@ -369,6 +369,7 @@ class ForeachChecker
|
||||
$foreach_context = clone $context;
|
||||
|
||||
$foreach_context->inside_loop = true;
|
||||
$foreach_context->inside_case = false;
|
||||
|
||||
if ($project_checker->alter_code) {
|
||||
$foreach_context->branch_point =
|
||||
|
@ -34,6 +34,7 @@ class WhileChecker
|
||||
$while_context = clone $context;
|
||||
|
||||
$while_context->inside_loop = true;
|
||||
$while_context->inside_case = false;
|
||||
|
||||
$project_checker = $statements_checker->getFileChecker()->project_checker;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user