PMC-1401 warning issues in class.phpSqlParser.php

This commit is contained in:
Roly Rudy Gutierrez Pinto
2019-11-26 12:24:21 -04:00
parent 40bb7f17a7
commit ad57c397b6

View File

@@ -876,6 +876,8 @@ EOREGEX;
} }
break; break;
} }
$shouldItContinue = false;
switch ($upper) { switch ($upper) {
case 'AS': case 'AS':
$token_count ++; $token_count ++;
@@ -886,7 +888,7 @@ EOREGEX;
++ $n; ++ $n;
} }
continue; $shouldItContinue = true;
break; break;
case 'INDEX': case 'INDEX':
if ($token_category == 'CREATE') { if ($token_category == 'CREATE') {
@@ -908,12 +910,12 @@ EOREGEX;
case 'OUTER': case 'OUTER':
# $expression .= $token; # $expression .= $token;
$token_count ++; $token_count ++;
continue; $shouldItContinue = true;
break; break;
case 'FOR': case 'FOR':
$token_count ++; $token_count ++;
$skip_next = true; $skip_next = true;
continue; $shouldItContinue = true;
break; break;
case 'LEFT': case 'LEFT':
case 'RIGHT': case 'RIGHT':
@@ -969,7 +971,8 @@ EOREGEX;
break; break;
default: default:
if ($token === false || empty( $token ) || $token === "") { if ($token === false || empty( $token ) || $token === "") {
continue; $shouldItContinue = true;
break;
} }
if ($token_count == 0) { if ($token_count == 0) {
@@ -982,6 +985,9 @@ EOREGEX;
$token_count ++; $token_count ++;
break; break;
} }
if ($shouldItContinue === true) {
continue;
}
++ $i; ++ $i;
} }
if (substr( trim( $table ), 0, 1 ) == '(') { if (substr( trim( $table ), 0, 1 ) == '(') {