Code Duplication    Length = 9-12 lines in 2 locations

src/Statements/CreateStatement.php 1 location

@@ 555-566 (lines=12) @@
552
            $this->parameters = ParameterDefinition::parse($parser, $list);
553
            if ($this->options->has('FUNCTION')) {
554
                $token = $list->getNextOfType(Token::TYPE_KEYWORD);
555
                if ($token->value !== 'RETURNS') {
556
                    $parser->error(
557
                        __('A "RETURNS" keyword was expected.'),
558
                        $token
559
                    );
560
                } else {
561
                    ++$list->idx;
562
                    $this->return = DataType::parse(
563
                        $parser,
564
                        $list
565
                    );
566
                }
567
            }
568
            ++$list->idx;
569

src/Statements/InsertStatement.php 1 location

@@ 200-208 (lines=9) @@
197
            }
198
199
            if ($state === 0) {
200
                if ($token->type === Token::TYPE_KEYWORD
201
                    && $token->value !== 'INTO'
202
                ) {
203
                    $parser->error(__('Unexpected keyword.'), $token);
204
                    break;
205
                } else {
206
                    ++$list->idx;
207
                    $this->into = IntoKeyword::parse($parser, $list);
208
                }
209
210
                $state = 1;
211
            } elseif ($state === 1) {