Code Duplication    Length = 10-10 lines in 2 locations

src/Variables/Any.php 2 locations

@@ 46-55 (lines=10) @@
43
        }, $this->variables);
44
45
        // normal case: 1 or 2 or 3 ...
46
        if (!$negate) {
47
            return function(Node $n) use (&$conditions) {
48
                foreach ($conditions as $condition) {
49
                    if ($condition($n)) {
50
                        return true;
51
                    }
52
                }
53
                return false;
54
            };
55
        }
56
        // negated case: not (left_condition or right_condition)
57
        //             = not left_condition and not right_condition
58
        if ($negate) {
@@ 58-67 (lines=10) @@
55
        }
56
        // negated case: not (left_condition or right_condition)
57
        //             = not left_condition and not right_condition
58
        if ($negate) {
59
            return function(Node $n) use (&$conditions) {
60
                foreach ($conditions as $condition) {
61
                    if (!$condition($n)) {
62
                        return false;
63
                    }
64
                }
65
                return true;
66
            };
67
        }
68
    }
69
}
70