Code Duplication    Length = 6-8 lines in 2 locations

Parser/Token/ContextualToken.php 2 locations

@@ 32-37 (lines=6) @@
29
        }
30
31
        if (!$context->has($this->name)) {
32
            if (!$this->rule->validator->validate($context)) {
33
                $this->setValid(false);
34
            } else {
35
                $this->_valid       = true;
36
                $this->_end->_valid = false;
37
            }
38
        } else {
39
            if (!$this->rule->validator->validate($context, [ $this->name => Validator::CONTEXT_IN ])) {
40
                $this->setValid(false);
@@ 38-45 (lines=8) @@
35
                $this->_valid       = true;
36
                $this->_end->_valid = false;
37
            }
38
        } else {
39
            if (!$this->rule->validator->validate($context, [ $this->name => Validator::CONTEXT_IN ])) {
40
                $this->setValid(false);
41
            } else {
42
                $this->_valid       = false;
43
                $this->_end->_valid = true;
44
            }
45
        }
46
47
        $this->_end->_start = false;
48
        $this->_end         = false;