Skip to content

Commit 419e7ae

Browse files
committed
Fixing CC that must be less than 10 for method, and Lexer::solveAmbiguityOnStarOperator was 11.
1 parent 0338aa9 commit 419e7ae

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Lexer.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,9 @@ private function solveAmbiguityOnStarOperator()
365365
$iBak = $this->list->idx;
366366
while (null !== ($starToken = $this->list->getNextOfTypeAndValue(Token::TYPE_OPERATOR, '*'))) {
367367
// ::getNext already gets rid of whitespaces and comments.
368-
$next = $this->list->getNext();
369-
if ($next !== null) {
370-
if (($next->type === Token::TYPE_KEYWORD && $next->value === 'FROM')
371-
|| ($next->type === Token::TYPE_KEYWORD && $next->value === 'USING')
372-
|| ($next->type === Token::TYPE_OPERATOR && $next->value === ',')
373-
|| ($next->type === Token::TYPE_OPERATOR && $next->value === ')')
368+
if (($next = $this->list->getNext()) !== null) {
369+
if (($next->type === Token::TYPE_KEYWORD && in_array($next->value, ['FROM', 'USING'], true))
370+
|| ($next->type === Token::TYPE_OPERATOR && in_array($next->value, [',', ')'], true))
374371
) {
375372
$starToken->flags = Token::FLAG_OPERATOR_SQL;
376373
}

0 commit comments

Comments
 (0)