Code Duplication    Length = 13-13 lines in 2 locations

src/Components/CaseExpression.php 2 locations

@@ 171-183 (lines=13) @@
168
                        $parser->error(__('Unexpected keyword.'), $token);
169
                        break;
170
                    }
171
                } else {
172
                    if ($token->type === Token::TYPE_KEYWORD
173
                        && $token->value === 'THEN'
174
                    ) {
175
                        ++$list->idx; // Skip 'THEN'
176
                        $new_result = Expression::parse($parser, $list);
177
                        $state = 0;
178
                        $ret->results[] = $new_result;
179
                    } elseif ($token->type === Token::TYPE_KEYWORD) {
180
                        $parser->error(__('Unexpected keyword.'), $token);
181
                        break;
182
                    }
183
                }
184
            } elseif ($state === 2) {
185
                if ($type === 0) {
186
                    if ($token->type === Token::TYPE_KEYWORD
@@ 185-197 (lines=13) @@
182
                    }
183
                }
184
            } elseif ($state === 2) {
185
                if ($type === 0) {
186
                    if ($token->type === Token::TYPE_KEYWORD
187
                        && $token->value === 'THEN'
188
                    ) {
189
                        ++$list->idx; // Skip 'THEN'
190
                        $new_result = Expression::parse($parser, $list);
191
                        $ret->results[] = $new_result;
192
                        $state = 1;
193
                    } elseif ($token->type === Token::TYPE_KEYWORD) {
194
                        $parser->error(__('Unexpected keyword.'), $token);
195
                        break;
196
                    }
197
                }
198
            }
199
        }
200