Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 368-371 (lines=4) @@
365
366
        $current_parent = $this->current_leaf->parent;
367
368
        if ($this->current_leaf instanceof ParseTree\MethodTree && $type_token[0] === '...') {
369
            $this->createMethodParam($type_token, $this->current_leaf);
370
            return;
371
        }
372
373
        while ($current_parent
374
            && !$current_parent instanceof ParseTree\CallableTree
@@ 723-726 (lines=4) @@
720
    {
721
        $new_parent = !$this->current_leaf instanceof ParseTree\Root ? $this->current_leaf : null;
722
723
        if ($this->current_leaf instanceof ParseTree\MethodTree && $type_token[0][0] === '$') {
724
            $this->createMethodParam($type_token, $this->current_leaf);
725
            return;
726
        }
727
728
        $next_token = $this->t + 1 < $this->type_token_count ? $this->type_tokens[$this->t + 1] : null;
729