Code Duplication    Length = 3-5 lines in 2 locations

src/Components/DataType.php 1 location

@@ 126-128 (lines=3) @@
123
124
            if ($state === 0) {
125
                $ret->name = strtoupper($token->value);
126
                if (($token->type !== Token::TYPE_KEYWORD) || (!($token->flags & Token::FLAG_KEYWORD_DATA_TYPE))) {
127
                    $parser->error(__('Unrecognized data type.'), $token);
128
                }
129
                $state = 1;
130
            } elseif ($state === 1) {
131
                if (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {

src/Statement.php 1 location

@@ 242-246 (lines=5) @@
239
            // Only keywords are relevant here. Other parts of the query are
240
            // processed in the functions below.
241
            if ($token->type !== Token::TYPE_KEYWORD) {
242
                if (($token->type !== TOKEN::TYPE_COMMENT)
243
                    && ($token->type !== Token::TYPE_WHITESPACE)
244
                ) {
245
                    $parser->error(__('Unexpected token.'), $token);
246
                }
247
                continue;
248
            }
249