diff --git a/src/Statement.php b/src/Statement.php index f9e090263..adadb252c 100644 --- a/src/Statement.php +++ b/src/Statement.php @@ -407,12 +407,11 @@ public function parse(Parser $parser, TokensList $list) $this->after($parser, $list, $token); // #223 Here may make a patch, if last is delimiter, back one - if ($class !== null) { - if ((new $class()) instanceof FunctionCall) { - if ($list->offsetGet($list->idx)->type === Token::TYPE_DELIMITER) { - --$list->idx; - } - } + // TODO: when not supporting PHP 5.3 anymore, replace this by FunctionCall::class. + if ($class === 'PhpMyAdmin\\SqlParser\\Components\\FunctionCall' + && $list->offsetGet($list->idx)->type === Token::TYPE_DELIMITER + ) { + --$list->idx; } }