Code Duplication    Length = 7-9 lines in 2 locations

src/Components/JoinKeyword.php 1 location

@@ 142-150 (lines=9) @@
139
            } elseif ($state === 1) {
140
                $expr->expr = Expression::parse($parser, $list, array('field' => 'table'));
141
                $state = 2;
142
            } elseif ($state === 2) {
143
                if ($token->type === Token::TYPE_KEYWORD) {
144
                    if ($token->value === 'ON') {
145
                        $state = 3;
146
                    } elseif ($token->value === 'USING') {
147
                        $state = 4;
148
                    }
149
                }
150
            } elseif ($state === 3) {
151
                $expr->on = Condition::parse($parser, $list);
152
                $ret[] = $expr;
153
                $expr = new JoinKeyword();

src/Components/Key.php 1 location

@@ 166-172 (lines=7) @@
163
                } else {
164
                    $lastColumn['name'] = $token->value;
165
                }
166
            } elseif ($state === 3) {
167
                if (($token->type === Token::TYPE_OPERATOR) && ($token->value === ')')) {
168
                    $state = 2;
169
                } else {
170
                    $lastColumn['length'] = $token->value;
171
                }
172
            } elseif ($state === 4) {
173
                $ret->options = OptionsArray::parse($parser, $list, static::$KEY_OPTIONS);
174
                ++$list->idx;
175
                break;