Code Duplication    Length = 6-6 lines in 3 locations

src/Analysis/CompilesVars.php 3 locations

@@ 55-60 (lines=6) @@
52
53
        if ($var instanceof Vars\AsWellAs) {
54
            // normal case: $left_condition or $right_condition
55
            if (!$negate) {
56
                return $b->orX
57
                    ( $this->compile_var($table_name, $var->left())
58
                    , $this->compile_var($table_name, $var->right())
59
                    );
60
            }
61
            // negated case: not ($left_condition or $right_condition)
62
            //             = not $left_condition and not $right_condition
63
            if ($negate) {
@@ 63-68 (lines=6) @@
60
            }
61
            // negated case: not ($left_condition or $right_condition)
62
            //             = not $left_condition and not $right_condition
63
            if ($negate) {
64
                return $b->andX
65
                    ( $this->compile_var($table_name, $var->left(), true)
66
                    , $this->compile_var($table_name, $var->right(), true)
67
                    );
68
            }
69
        }
70
        if ($var instanceof Vars\ButNot) {
71
            return $b->andX
@@ 70-75 (lines=6) @@
67
                    );
68
            }
69
        }
70
        if ($var instanceof Vars\ButNot) {
71
            return $b->andX
72
                ( $this->compile_var($table_name, $var->left())
73
                , $this->compile_var($table_name, $var->right(), true)
74
                );
75
        }
76
        if ($var instanceof Vars\Classes) {
77
            return $eq_op("$table_name.type", $b->literal(Variable::CLASS_TYPE));
78
        }