Skip to content

Commit

Permalink
Fix php compatiblity (array syntax)
Browse files Browse the repository at this point in the history
Ref: fd4c4f3
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Nov 1, 2019
1 parent 3c174cb commit 4a919ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public function parse(Parser $parser, TokensList $list)
// Fix Issue #221: As `truncate` is not a keyword
// but it might be the beginning of a statement of truncate,
// so let the value use the keyword field for truncate type.
$token_value = in_array($token->keyword, ['TRUNCATE']) ? $token->keyword : $token->value;
$token_value = in_array($token->keyword, array('TRUNCATE')) ? $token->keyword : $token->value;
if (! empty(Parser::$KEYWORD_PARSERS[$token_value]) && $list->idx < $list->count) {
$class = Parser::$KEYWORD_PARSERS[$token_value]['class'];
$field = Parser::$KEYWORD_PARSERS[$token_value]['field'];
Expand Down

0 comments on commit 4a919ae

Please sign in to comment.