Code Duplication    Length = 12-12 lines in 2 locations

src/Psalm/Internal/Type/ParseTreeCreator.php 2 locations

@@ 66-77 (lines=12) @@
63
                    $this->handleClosedRoundBracket();
64
                    break;
65
66
                case '>':
67
                    do {
68
                        if ($this->current_leaf->parent === null) {
69
                            throw new TypeParseTreeException('Cannot parse generic type');
70
                        }
71
72
                        $this->current_leaf = $this->current_leaf->parent;
73
                    } while (!$this->current_leaf instanceof ParseTree\GenericTree);
74
75
                    $this->current_leaf->terminated = true;
76
77
                    break;
78
79
                case '}':
80
                    do {
@@ 79-90 (lines=12) @@
76
77
                    break;
78
79
                case '}':
80
                    do {
81
                        if ($this->current_leaf->parent === null) {
82
                            throw new TypeParseTreeException('Cannot parse array type');
83
                        }
84
85
                        $this->current_leaf = $this->current_leaf->parent;
86
                    } while (!$this->current_leaf instanceof ParseTree\ObjectLikeTree);
87
88
                    $this->current_leaf->terminated = true;
89
90
                    break;
91
92
                case ',':
93
                    $this->handleComma();