Code Duplication    Length = 6-7 lines in 4 locations

src/Components/AlterOperation.php 1 location

@@ 184-189 (lines=6) @@
181
                $ret->options = OptionsArray::parse($parser, $list, $options);
182
183
                if ($ret->options->has('AS')) {
184
                    for (; $list->idx < $list->count; ++$list->idx) {
185
                        if ($list->tokens[$list->idx]->type === Token::TYPE_DELIMITER) {
186
                            break;
187
                        }
188
                        $ret->unknown[] = $list->tokens[$list->idx];
189
                    }
190
                    break;
191
                }
192

src/Statements/CreateStatement.php 2 locations

@@ 585-591 (lines=7) @@
582
            }
583
584
            // Parsing the `AS` keyword.
585
            for (; $list->idx < $list->count; ++$list->idx) {
586
                $token = $list->tokens[$list->idx];
587
                if ($token->type === Token::TYPE_DELIMITER) {
588
                    break;
589
                }
590
                $this->body[] = $token;
591
            }
592
        } elseif ($this->options->has('TRIGGER')) {
593
            // Parsing the time and the event.
594
            $this->entityOptions = OptionsArray::parse(
@@ 623-629 (lines=7) @@
620
                $this->body[] = $token;
621
            }
622
        } else {
623
            for (; $list->idx < $list->count; ++$list->idx) {
624
                $token = $list->tokens[$list->idx];
625
                if ($token->type === Token::TYPE_DELIMITER) {
626
                    break;
627
                }
628
                $this->body[] = $token;
629
            }
630
        }
631
    }
632
}

src/Statements/NotImplementedStatement.php 1 location

@@ 54-59 (lines=6) @@
51
     */
52
    public function parse(Parser $parser, TokensList $list)
53
    {
54
        for (; $list->idx < $list->count; ++$list->idx) {
55
            if ($list->tokens[$list->idx]->type === Token::TYPE_DELIMITER) {
56
                break;
57
            }
58
            $this->unknown[] = $list->tokens[$list->idx];
59
        }
60
    }
61
}
62