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/ReplaceStatement.php 1 location

@@ 163-171 (lines=9) @@
160
            }
161
162
            if ($state === 0) {
163
                if ($token->type === Token::TYPE_KEYWORD
164
                    && $token->value !== 'INTO'
165
                ) {
166
                    $parser->error(__('Unexpected keyword.'), $token);
167
                    break;
168
                } else {
169
                    ++$list->idx;
170
                    $this->into = IntoKeyword::parse($parser, $list);
171
                }
172
173
                $state = 1;
174
            } elseif ($state === 1) {