Code Duplication    Length = 12-14 lines in 2 locations

src/Token/OperatorToken.php 2 locations

@@ 36-49 (lines=14) @@
33
    public function getPriority($assoc = 'left')
34
    {
35
        if ($assoc === 'right') {
36
            switch ($this->value) {
37
                case '^':
38
                    return 5;
39
                case '/':
40
                    return 4;
41
                case '*':
42
                    return 3;
43
                case '-':
44
                    return 2;
45
                case '+':
46
                    return 1;
47
                default:
48
                    return 0;
49
            }
50
        } else {
51
            switch ($this->value) {
52
                case '^':
@@ 51-62 (lines=12) @@
48
                    return 0;
49
            }
50
        } else {
51
            switch ($this->value) {
52
                case '^':
53
                    return 3;
54
                case '*':
55
                case '/':
56
                    return 2;
57
                case '+':
58
                case '-':
59
                    return 1;
60
                default:
61
                    return 0;
62
            }
63
        }
64
    }
65