Code Duplication    Length = 5-5 lines in 2 locations

src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/CoalesceAnalyzer.php 1 location

@@ 53-57 (lines=5) @@
50
            }
51
        }
52
53
        foreach ($context->vars_possibly_in_scope as $var_id => $_) {
54
            if (!isset($context->vars_in_scope[$var_id])) {
55
                $mixed_var_ids[] = $var_id;
56
            }
57
        }
58
59
        $if_clauses = array_values(
60
            array_map(

src/Psalm/Internal/Analyzer/Statements/Expression/TernaryAnalyzer.php 1 location

@@ 72-76 (lines=5) @@
69
            }
70
        }
71
72
        foreach ($context->vars_possibly_in_scope as $var_id => $_) {
73
            if (!isset($context->vars_in_scope[$var_id])) {
74
                $mixed_var_ids[] = $var_id;
75
            }
76
        }
77
78
        $if_clauses = array_values(
79
            array_map(